From d17ff1ea42571817d74962062410ca54a06b2053 Mon Sep 17 00:00:00 2001 From: file 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: http://svn.digium.com/svn/asterisk/trunk@75200 f38db490-d61c-443f-a65b-d21fe96a405b --- apps/app_parkandannounce.c | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'apps/app_parkandannounce.c') diff --git a/apps/app_parkandannounce.c b/apps/app_parkandannounce.c index fe63da9e1..138694c5a 100644 --- a/apps/app_parkandannounce.c +++ b/apps/app_parkandannounce.c @@ -90,21 +90,16 @@ static int parkandannounce_exec(struct ast_channel *chan, void *data) struct outgoing_helper oh; int outstate; - struct ast_module_user *u; - if (ast_strlen_zero(data)) { ast_log(LOG_WARNING, "ParkAndAnnounce requires arguments: (announce:template|timeout|dial|[return_context])\n"); return -1; } - u = ast_module_user_add(chan); - s = ast_strdupa(data); template=strsep(&s,"|"); if(! template) { ast_log(LOG_WARNING, "PARK: An announce template must be defined\n"); - ast_module_user_remove(u); return -1; } @@ -115,7 +110,6 @@ static int parkandannounce_exec(struct ast_channel *chan, void *data) dial=strsep(&s, "|"); if(!dial) { ast_log(LOG_WARNING, "PARK: A dial resource must be specified i.e: Console/dsp or Zap/g1/5551212\n"); - ast_module_user_remove(u); return -1; } else { dialtech=strsep(&dial, "/"); @@ -147,7 +141,6 @@ static int parkandannounce_exec(struct ast_channel *chan, void *data) } if(atoi(priority) < 0) { ast_log(LOG_WARNING, "Priority '%s' must be a number > 0\n", priority); - ast_module_user_remove(u); return -1; } /* At this point we have a priority and maybe an extension and a context */ @@ -193,12 +186,10 @@ static int parkandannounce_exec(struct ast_channel *chan, void *data) ast_verbose(VERBOSE_PREFIX_4 "Channel %s was never answered.\n", dchan->name); ast_log(LOG_WARNING, "PARK: Channel %s was never answered for the announce.\n", dchan->name); ast_hangup(dchan); - ast_module_user_remove(u); return -1; } } else { ast_log(LOG_WARNING, "PARK: Unable to allocate announce channel.\n"); - ast_module_user_remove(u); return -1; } @@ -235,8 +226,6 @@ static int parkandannounce_exec(struct ast_channel *chan, void *data) ast_stopstream(dchan); ast_hangup(dchan); - ast_module_user_remove(u); - return res; } -- cgit v1.2.3