diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-07-16 14:39:29 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-07-16 14:39:29 +0000 |
commit | d17ff1ea42571817d74962062410ca54a06b2053 (patch) | |
tree | 1236d574745c7d4d49bb3fb658e3a6bdd3e88a22 /apps/app_alarmreceiver.c | |
parent | 9e24ed5ccff762fa9d412d1a1321df2de1b26423 (diff) |
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: http://svn.digium.com/svn/asterisk/trunk@75200 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_alarmreceiver.c')
-rw-r--r-- | apps/app_alarmreceiver.c | 15 |
1 files changed, 1 insertions, 14 deletions
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; } |