From b8cd949ccea7f878578f16def5b3144c050d315e Mon Sep 17 00:00:00 2001 From: Joshua Colp Date: Mon, 16 Jul 2007 14:39:29 +0000 Subject: Applications no longer need to call ast_module_user_add and ast_module_user_remove. This is now taken care of in the pbx_exec function outside of the application. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75200 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- apps/app_alarmreceiver.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'apps/app_alarmreceiver.c') diff --git a/apps/app_alarmreceiver.c b/apps/app_alarmreceiver.c index 0b695eb16..1c759cd42 100644 --- a/apps/app_alarmreceiver.c +++ b/apps/app_alarmreceiver.c @@ -628,14 +628,11 @@ static int receive_ademco_contact_id( struct ast_channel *chan, void *data, int static int alarmreceiver_exec(struct ast_channel *chan, void *data) { int res = 0; - struct ast_module_user *u; event_node_t *elp, *efree; char signalling_type[64] = ""; event_node_t *event_head = NULL; - u = ast_module_user_add(chan); - /* Set write and read formats to ULAW */ if(option_verbose >= 4) @@ -643,13 +640,11 @@ static int alarmreceiver_exec(struct ast_channel *chan, void *data) if (ast_set_write_format(chan,AST_FORMAT_ULAW)){ ast_log(LOG_WARNING, "AlarmReceiver: Unable to set write format to Mu-law on %s\n",chan->name); - ast_module_user_remove(u); return -1; } if (ast_set_read_format(chan,AST_FORMAT_ULAW)){ ast_log(LOG_WARNING, "AlarmReceiver: Unable to set read format to Mu-law on %s\n",chan->name); - ast_module_user_remove(u); return -1; } @@ -664,13 +659,8 @@ static int alarmreceiver_exec(struct ast_channel *chan, void *data) ast_verbose(VERBOSE_PREFIX_4 "AlarmReceiver: Answering channel\n"); if (chan->_state != AST_STATE_UP) { - - res = ast_answer(chan); - - if (res) { - ast_module_user_remove(u); + if ((res = ast_answer(chan))) return -1; - } } /* Wait for the connection to settle post-answer */ @@ -722,9 +712,6 @@ static int alarmreceiver_exec(struct ast_channel *chan, void *data) ast_free(efree); } - - ast_module_user_remove(u); - return 0; } -- cgit v1.2.3