diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-12-11 21:46:29 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-12-11 21:46:29 +0000 |
commit | b7321e16b1c02d823c55e257fd4c42ccc4db42ef (patch) | |
tree | 5c0f98540893addfff9b623bf1c430854cb847e6 /funcs | |
parent | eea662de8a2ab9f1b8e467485de03cfa2ee001bc (diff) |
Fix some observed slowdowns in dialplan processing.
The change is to remove autoservice usage from dialplan functions that do not
need it because they do not perform operations that potentially block.
(closes issue #13940)
Reported by: tbelder
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@163253 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'funcs')
-rw-r--r-- | funcs/func_cut.c | 2 | ||||
-rw-r--r-- | funcs/func_strings.c | 16 |
2 files changed, 0 insertions, 18 deletions
diff --git a/funcs/func_cut.c b/funcs/func_cut.c index 51b9adc70..b8f5c5869 100644 --- a/funcs/func_cut.c +++ b/funcs/func_cut.c @@ -254,7 +254,6 @@ static int acf_cut_exec(struct ast_channel *chan, char *cmd, char *data, char *b struct ast_module_user *u = NULL; if (chan) { - ast_autoservice_start(chan); u = ast_module_user_add(chan); } @@ -277,7 +276,6 @@ static int acf_cut_exec(struct ast_channel *chan, char *cmd, char *data, char *b if (chan) { ast_module_user_remove(u); - ast_autoservice_stop(chan); } return ret; diff --git a/funcs/func_strings.c b/funcs/func_strings.c index 2b4c43c80..8b0d562ba 100644 --- a/funcs/func_strings.c +++ b/funcs/func_strings.c @@ -53,9 +53,6 @@ static int function_fieldqty(struct ast_channel *chan, char *cmd, AST_APP_ARG(delim); ); - if (chan) - ast_autoservice_start(chan); - AST_STANDARD_APP_ARGS(args, parse); if (args.delim) { varsubst = alloca(strlen(args.varname) + 4); @@ -73,9 +70,6 @@ static int function_fieldqty(struct ast_channel *chan, char *cmd, } snprintf(buf, len, "%d", fieldcount); - if (chan) - ast_autoservice_stop(chan); - return 0; } @@ -184,9 +178,6 @@ static int array(struct ast_channel *chan, char *cmd, char *var, if (!var || !value2) return -1; - if (chan) - ast_autoservice_start(chan); - /* The functions this will generally be used with are SORT and ODBC_*, which * both return comma-delimited lists. However, if somebody uses literal lists, * their commas will be translated to vertical bars by the load, and I don't @@ -218,9 +209,6 @@ static int array(struct ast_channel *chan, char *cmd, char *var, } } - if (chan) - ast_autoservice_stop(chan); - return 0; } @@ -543,11 +531,7 @@ static int function_eval(struct ast_channel *chan, char *cmd, char *data, return -1; } - if (chan) - ast_autoservice_start(chan); pbx_substitute_variables_helper(chan, data, buf, len - 1); - if (chan) - ast_autoservice_stop(chan); return 0; } |