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
This commit is contained in:
Joshua Colp
2007-07-16 14:39:29 +00:00
parent 96a646734f
commit b8cd949cce
70 changed files with 78 additions and 722 deletions

View File

@@ -1195,7 +1195,6 @@ static int setup_privacy_args(struct privacy_args *pa,
static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags *peerflags, int *continue_exec)
{
int res = -1; /* default: error */
struct ast_module_user *u;
char *rest, *cur; /* scan the list of destinations */
struct chanlist *outgoing = NULL; /* list of destinations */
struct ast_channel *peer;
@@ -1234,8 +1233,6 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
return -1;
}
u = ast_module_user_add(chan); /* XXX is this the right place ? */
parse = ast_strdupa(data);
AST_STANDARD_APP_ARGS(args, parse);
@@ -1820,7 +1817,6 @@ out:
}
done:
ast_module_user_remove(u); /* XXX probably not the right place for this. */
return res;
}
@@ -1838,7 +1834,6 @@ static int retrydial_exec(struct ast_channel *chan, void *data)
char *announce = NULL, *dialdata = NULL;
const char *context = NULL;
int sleep = 0, loops = 0, res = -1;
struct ast_module_user *u;
struct ast_flags peerflags;
if (ast_strlen_zero(data)) {
@@ -1846,8 +1841,6 @@ static int retrydial_exec(struct ast_channel *chan, void *data)
return -1;
}
u = ast_module_user_add(chan);
announce = ast_strdupa(data);
memset(&peerflags, 0, sizeof(peerflags));
@@ -1934,7 +1927,6 @@ static int retrydial_exec(struct ast_channel *chan, void *data)
if (ast_test_flag(chan, AST_FLAG_MOH))
ast_moh_stop(chan);
done:
ast_module_user_remove(u);
return res;
}
@@ -1946,9 +1938,8 @@ static int unload_module(void)
res = ast_unregister_application(app);
res |= ast_unregister_application(rapp);
if ((con = ast_context_find("app_dial_gosub_virtual_context"))) {
if ((con = ast_context_find("app_dial_gosub_virtual_context")))
ast_context_remove_extension2(con, "s", 1, NULL);
}
return res;
}