From f59eb98821f88a4108c78b2853b0cca75ad8caf2 Mon Sep 17 00:00:00 2001 From: tilghman Date: Sun, 28 Oct 2007 13:46:55 +0000 Subject: 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: http://svn.digium.com/svn/asterisk/branches/1.4@87262 f38db490-d61c-443f-a65b-d21fe96a405b --- funcs/func_cut.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'funcs/func_cut.c') diff --git a/funcs/func_cut.c b/funcs/func_cut.c index 09340cac5..bcabd0508 100644 --- a/funcs/func_cut.c +++ b/funcs/func_cut.c @@ -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; } -- cgit v1.2.3