[asterisk-commits] murf: branch 1.2 r39931 - /branches/1.2/apps/app_macro.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Aug 15 15:13:47 MST 2006


Author: murf
Date: Tue Aug 15 17:13:47 2006
New Revision: 39931

URL: http://svn.digium.com/view/asterisk?rev=39931&view=rev
Log:
This revision fixes bug 7731, the inability for macros to be called more than one level deep in the 'h' extension.
It also pushes up the limit of recursion depth from 7 to 20.



Modified:
    branches/1.2/apps/app_macro.c

Modified: branches/1.2/apps/app_macro.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/apps/app_macro.c?rev=39931&r1=39930&r2=39931&view=diff
==============================================================================
--- branches/1.2/apps/app_macro.c (original)
+++ branches/1.2/apps/app_macro.c Tue Aug 15 17:13:47 2006
@@ -127,7 +127,7 @@
 		depth = 0;
 	}
 
-	if (depth >= 7) {
+	if (depth >= 20) {
 		ast_log(LOG_ERROR, "Macro():  possible infinite loop detected.  Returning early.\n");
 		LOCAL_USER_REMOVE(u);
 		return 0;
@@ -241,9 +241,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