[svn-commits] russell: branch 1.4 r163253 - in /branches/1.4/funcs: func_cut.c func_strings.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Dec 11 15:46:30 CST 2008


Author: russell
Date: Thu Dec 11 15:46:29 2008
New Revision: 163253

URL: http://svn.digium.com/view/asterisk?view=rev&rev=163253
Log:
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

Modified:
    branches/1.4/funcs/func_cut.c
    branches/1.4/funcs/func_strings.c

Modified: branches/1.4/funcs/func_cut.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/funcs/func_cut.c?view=diff&rev=163253&r1=163252&r2=163253
==============================================================================
--- branches/1.4/funcs/func_cut.c (original)
+++ branches/1.4/funcs/func_cut.c Thu Dec 11 15:46:29 2008
@@ -254,7 +254,6 @@
 	struct ast_module_user *u = NULL;
 
 	if (chan) {
-		ast_autoservice_start(chan);
 		u = ast_module_user_add(chan);
 	}
 
@@ -277,7 +276,6 @@
 
 	if (chan) {
 		ast_module_user_remove(u);
-		ast_autoservice_stop(chan);
 	}
 
 	return ret;

Modified: branches/1.4/funcs/func_strings.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/funcs/func_strings.c?view=diff&rev=163253&r1=163252&r2=163253
==============================================================================
--- branches/1.4/funcs/func_strings.c (original)
+++ branches/1.4/funcs/func_strings.c Thu Dec 11 15:46:29 2008
@@ -53,9 +53,6 @@
 			     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 @@
 	}
 	snprintf(buf, len, "%d", fieldcount);
 
-	if (chan)
-		ast_autoservice_stop(chan);
-
 	return 0;
 }
 
@@ -183,9 +177,6 @@
 	value2 = ast_strdupa(value);
 	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,
@@ -217,9 +208,6 @@
 			pbx_builtin_setvar_helper(chan, arg1.var[i], "");
 		}
 	}
-
-	if (chan)
-		ast_autoservice_stop(chan);
 
 	return 0;
 }
@@ -543,11 +531,7 @@
 		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;
 }




More information about the svn-commits mailing list