[asterisk-commits] murf: trunk r39909 - /trunk/apps/app_macro.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Aug 15 14:25:20 MST 2006


Author: murf
Date: Tue Aug 15 16:25:19 2006
New Revision: 39909

URL: http://svn.digium.com/view/asterisk?rev=39909&view=rev
Log:
This change fixes bug 7731, macros not executing more than one level deep in a hung-up situation; also increased maximum recursion depth from 7 to 20, to keep serious coders from painful toe-stubbings

Modified:
    trunk/apps/app_macro.c

Modified: trunk/apps/app_macro.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_macro.c?rev=39909&r1=39908&r2=39909&view=diff
==============================================================================
--- trunk/apps/app_macro.c (original)
+++ trunk/apps/app_macro.c Tue Aug 15 16:25:19 2006
@@ -133,7 +133,7 @@
 	s = pbx_builtin_getvar_helper(chan, "MACRO_DEPTH");
 	if (s)
 		sscanf(s, "%d", &depth);
-	if (depth >= 7) {
+	if (depth >= 20) {
 		ast_log(LOG_ERROR, "Macro():  possible infinite loop detected.  Returning early.\n");
 		LOCAL_USER_REMOVE(u);
 		return 0;
@@ -254,9 +254,9 @@
 			break;
 		}
 		/* don't stop executing extensions when we're in "h" */
-		if (chan->_softhangup && strcasecmp(oldexten,"h")) {
-			ast_log(LOG_DEBUG, "Extension %s, priority %d returned normally even though call was hung up\n",
-				chan->exten, chan->priority);
+		if (chan->_softhangup && strcasecmp(chan->macroexten,"h")) {
+			ast_log(LOG_DEBUG, "Extension %s, macroexten %s, priority %d returned normally even though call was hung up\n",
+				chan->exten, chan->macroexten, chan->priority);
 			goto out;
 		}
 		chan->priority++;



More information about the asterisk-commits mailing list