funcs/func_resonance.c
static int remove_resonance_filter(struct ast_channel *chan)
{
	struct ast_datastore *datastore = NULL;
	struct resonance_information *data;
	SCOPED_CHANNELLOCK(chan_lock, chan);

	datastore = ast_channel_datastore_find(chan, &resonance_datastore, NULL);
	if (!datastore) {
		ast_log(AST_LOG_WARNING, "Cannot remove RESONANCE_FILTER from %s: RESONANCE_FILTER not currently enabled\n",
		        ast_channel_name(chan));
		return -1;
	}
	data = datastore->data;

	if (ast_audiohook_remove(chan, &data->audiohook)) {
		ast_log(AST_LOG_WARNING, "Failed to remove RESONANCE_FILTER audiohook from channel %s\n", ast_channel_name(chan));
		return -1;
	}

	if (ast_channel_datastore_remove(chan, datastore)) {
		ast_log(AST_LOG_WARNING, "Failed to remove RESONANCE_FILTER datastore from channel %s\n",
		        ast_channel_name(chan));
		return -1;
	}
	ast_datastore_free(datastore);

	return 0;
}
/*! \internal \brief Disable resonance filtering on the channel */
\internal \brief Disable resonance filtering on the channel
\ internal \ brief Disable resonance filtering on the channel
static int remove_resonance_filter(struct ast_channel *chan)
{
	struct ast_datastore *datastore = NULL;
	struct resonance_information *data;
	SCOPED_CHANNELLOCK(chan_lock, chan);
	datastore = ast_channel_datastore_find(chan, &resonance_datastore, NULL);
	if (!datastore) {
		ast_log(AST_LOG_WARNING, "Cannot remove RESONANCE_FILTER from %s: RESONANCE_FILTER not currently enabled\n",
		        ast_channel_name(chan));
		return -1;
	}
	data = datastore->data;
	if (ast_audiohook_remove(chan, &data->audiohook)) {
		ast_log(AST_LOG_WARNING, "Failed to remove RESONANCE_FILTER audiohook from channel %s\n", ast_channel_name(chan));
		return -1;
	}
	if (ast_channel_datastore_remove(chan, datastore)) {
		ast_log(AST_LOG_WARNING, "Failed to remove RESONANCE_FILTER datastore from channel %s\n",
		        ast_channel_name(chan));
		return -1;
	}
	ast_datastore_free(datastore);
	return 0;
}
static int remove_resonance_filter ( struct ast_channel * chan ) { struct ast_datastore * datastore = NULL ; struct resonance_information * data ; SCOPED_CHANNELLOCK ( chan_lock , chan ) ; datastore = ast_channel_datastore_find ( chan , & resonance_datastore , NULL ) ; if ( ! datastore ) { ast_log ( AST_LOG_WARNING , " \n " , ast_channel_name ( chan ) ) ; return -1 ; } data = datastore -> data ; if ( ast_audiohook_remove ( chan , & data -> audiohook ) ) { ast_log ( AST_LOG_WARNING , " \n " , ast_channel_name ( chan ) ) ; return -1 ; } if ( ast_channel_datastore_remove ( chan , datastore ) ) { ast_log ( AST_LOG_WARNING , " \n " , ast_channel_name ( chan ) ) ; return -1 ; } ast_datastore_free ( datastore ) ; return 0 ; }
\internal \brief Disable resonance filtering on the channel
\ internal \ brief Disable resonance filtering on the channel