summaryrefslogtreecommitdiff
path: root/main/pbx.c
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2007-03-01 00:08:18 +0000
committerJoshua Colp <jcolp@digium.com>2007-03-01 00:08:18 +0000
commit5bc0d8d32450c6e256c074a00823e681b85fc505 (patch)
tree2d2d2482266f5261e7200071f69ecc26076e9dfc /main/pbx.c
parentae8c0f3fcb8b39b8ebc8a24ab9d9847cc8a37e66 (diff)
Minor code cleanup... nothing to write home about.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@57241 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/pbx.c')
-rw-r--r--main/pbx.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/main/pbx.c b/main/pbx.c
index f12966730..558abdae3 100644
--- a/main/pbx.c
+++ b/main/pbx.c
@@ -934,17 +934,17 @@ static struct ast_exten *pbx_find_extension(struct ast_channel *chan,
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 @@ static struct ast_exten *pbx_find_extension(struct ast_channel *chan,
if (!tmp)
return NULL;
}
+
if (q->status < STATUS_NO_EXTENSION)
q->status = STATUS_NO_EXTENSION;