diff options
author | Tilghman Lesher <tilghman@meg.abyt.es> | 2007-10-28 14:11:01 +0000 |
---|---|---|
committer | Tilghman Lesher <tilghman@meg.abyt.es> | 2007-10-28 14:11:01 +0000 |
commit | 64a0a9aa2c98626e1de78e66829e7545d5e5f1bf (patch) | |
tree | febd3ec84ac74e88878a3bb8ad213a0d79d261de /funcs/func_cut.c | |
parent | 0706014b1bdc1d7ab5a316f421ce663d859b3820 (diff) |
Merged revisions 87262 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r87262 | tilghman | 2007-10-28 08:46:55 -0500 (Sun, 28 Oct 2007) | 7 lines
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/trunk@87263 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'funcs/func_cut.c')
-rw-r--r-- | funcs/func_cut.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/funcs/func_cut.c b/funcs/func_cut.c index 7b4f0f41d..82a564b42 100644 --- a/funcs/func_cut.c +++ b/funcs/func_cut.c @@ -126,7 +126,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); @@ -235,6 +235,9 @@ static int acf_cut_exec(struct ast_channel *chan, const char *cmd, char *data, c { int ret = -1; + if (chan) + ast_autoservice_start(chan); + switch (cut_internal(chan, data, buf, len)) { case ERROR_NOARG: ast_log(LOG_ERROR, "Syntax: CUT(<varname>,<char-delim>,<range-spec>) - missing argument!\n"); @@ -252,6 +255,9 @@ static int acf_cut_exec(struct ast_channel *chan, const char *cmd, char *data, c ast_log(LOG_ERROR, "Unknown internal error\n"); } + if (chan) + ast_autoservice_stop(chan); + return ret; } |