Add autoservice to several more functions which might delay in their responses.

Also, make sure that func_odbc functions have a channel on which to set
variables.
Reported by russell
Fixed by tilghman
Closes issue #11099


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@87262 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Tilghman Lesher
2007-10-28 13:46:55 +00:00
parent 4c7393a6a4
commit 18eafd3074
4 changed files with 88 additions and 7 deletions

View File

@@ -125,7 +125,7 @@ static int cut_internal(struct ast_channel *chan, char *data, char *buffer, size
);
memset(buffer, 0, buflen);
parse = ast_strdupa(data);
AST_STANDARD_APP_ARGS(args, parse);
@@ -253,7 +253,10 @@ static int acf_cut_exec(struct ast_channel *chan, char *cmd, char *data, char *b
int ret = -1;
struct ast_module_user *u;
u = ast_module_user_add(chan);
if (chan) {
ast_autoservice_start(chan);
u = ast_module_user_add(chan);
}
switch (cut_internal(chan, data, buf, len)) {
case ERROR_NOARG:
@@ -272,7 +275,10 @@ static int acf_cut_exec(struct ast_channel *chan, char *cmd, char *data, char *b
ast_log(LOG_ERROR, "Unknown internal error\n");
}
ast_module_user_remove(u);
if (chan) {
ast_module_user_remove(u);
ast_autoservice_stop(chan);
}
return ret;
}