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_stack.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_stack.c')
-rw-r--r-- | apps/app_stack.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/apps/app_stack.c b/apps/app_stack.c index 4e4d78aec..2b8a67a80 100644 --- a/apps/app_stack.c +++ b/apps/app_stack.c @@ -238,7 +238,6 @@ static int gosub_exec(struct ast_channel *chan, void *data) struct gosub_stack_frame *newframe; char argname[15], *tmp = ast_strdupa(data), *label, *endparen; int i; - struct ast_module_user *u; AST_DECLARE_APP_ARGS(args2, AST_APP_ARG(argval)[100]; ); @@ -248,14 +247,11 @@ static int gosub_exec(struct ast_channel *chan, void *data) return -1; } - u = ast_module_user_add(chan); - if (!stack_store) { ast_debug(1, "Channel %s has no datastore, so we're allocating one.\n", chan->name); stack_store = ast_channel_datastore_alloc(&stack_info, NULL); if (!stack_store) { ast_log(LOG_ERROR, "Unable to allocate new datastore. Gosub will fail.\n"); - ast_module_user_remove(u); return -1; } @@ -263,7 +259,6 @@ static int gosub_exec(struct ast_channel *chan, void *data) if (!oldlist) { ast_log(LOG_ERROR, "Unable to allocate datastore list head. Gosub will fail.\n"); ast_channel_datastore_free(stack_store); - ast_module_user_remove(u); return -1; } @@ -294,7 +289,6 @@ static int gosub_exec(struct ast_channel *chan, void *data) if (ast_parseable_goto(chan, label)) { ast_log(LOG_ERROR, "Gosub address is invalid: '%s'\n", (char *)data); ast_free(newframe); - ast_module_user_remove(u); return -1; } @@ -311,14 +305,11 @@ static int gosub_exec(struct ast_channel *chan, void *data) AST_LIST_INSERT_HEAD(oldlist, newframe, entries); AST_LIST_UNLOCK(oldlist); - ast_module_user_remove(u); - return 0; } static int gosubif_exec(struct ast_channel *chan, void *data) { - struct ast_module_user *u; char *args; int res=0; AST_DECLARE_APP_ARGS(cond, @@ -335,13 +326,10 @@ static int gosubif_exec(struct ast_channel *chan, void *data) return 0; } - u = ast_module_user_add(chan); - args = ast_strdupa(data); AST_NONSTANDARD_APP_ARGS(cond, args, '?'); if (cond.argc != 2) { ast_log(LOG_WARNING, "GosubIf requires an argument: GosubIf(cond?label1(args):label2(args)\n"); - ast_module_user_remove(u); return 0; } @@ -354,7 +342,6 @@ static int gosubif_exec(struct ast_channel *chan, void *data) res = gosub_exec(chan, label.iffalse); } - ast_module_user_remove(u); return res; } |