[asterisk-commits] file: trunk r57241 - /trunk/main/pbx.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Feb 28 17:08:19 MST 2007


Author: file
Date: Wed Feb 28 18:08:18 2007
New Revision: 57241

URL: http://svn.digium.com/view/asterisk?view=rev&rev=57241
Log:
Minor code cleanup... nothing to write home about.

Modified:
    trunk/main/pbx.c

Modified: trunk/main/pbx.c
URL: http://svn.digium.com/view/asterisk/trunk/main/pbx.c?view=diff&rev=57241&r1=57240&r2=57241
==============================================================================
--- trunk/main/pbx.c (original)
+++ trunk/main/pbx.c Wed Feb 28 18:08:18 2007
@@ -934,17 +934,17 @@
 		q->swo = NULL;
 		q->data = NULL;
 		q->foundcontext = NULL;
-	}
-	/* Check for stack overflow */
-	if (q->stacklen >= AST_PBX_MAX_STACK) {
+	} else if (q->stacklen >= AST_PBX_MAX_STACK) {
 		ast_log(LOG_WARNING, "Maximum PBX stack exceeded\n");
 		return NULL;
 	}
+
 	/* Check first to see if we've already been checked */
 	for (x = 0; x < q->stacklen; x++) {
 		if (!strcasecmp(q->incstack[x], context))
 			return NULL;
 	}
+
 	if (bypass)	/* bypass means we only look there */
 		tmp = bypass;
 	else {	/* look in contexts */
@@ -956,6 +956,7 @@
 		if (!tmp)
 			return NULL;
 	}
+
 	if (q->status < STATUS_NO_EXTENSION)
 		q->status = STATUS_NO_EXTENSION;
 



More information about the asterisk-commits mailing list