]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
It's possible that a channel can have an async goto on the successful execution of...
authorJason Parker <jparker@digium.com>
Fri, 11 Apr 2008 21:35:16 +0000 (21:35 +0000)
committerJason Parker <jparker@digium.com>
Fri, 11 Apr 2008 21:35:16 +0000 (21:35 +0000)
Closes issue #12172.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@114072 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/pbx.c

index 41027c35a110637d1c49189bdb721b0af15461f4..685610583c8def8d645a7b037b97978b81e67a24 100644 (file)
@@ -2439,7 +2439,7 @@ static int __ast_pbx_run(struct ast_channel *c)
                                if (option_verbose > 1)
                                        ast_verbose( VERBOSE_PREFIX_2 "Spawn extension (%s, %s, %d) exited non-zero on '%s'\n", c->context, c->exten, c->priority, c->name);
                                if (c->_softhangup == AST_SOFTHANGUP_ASYNCGOTO) {
-                                       c->_softhangup =0;
+                                       c->_softhangup = 0;
                                } else if (c->_softhangup == AST_SOFTHANGUP_TIMEOUT) {
                                        /* atimeout, nothing bad */
                                } else {
@@ -2449,7 +2449,9 @@ static int __ast_pbx_run(struct ast_channel *c)
                                        break;
                                }
                        }
-                       if (c->_softhangup == AST_SOFTHANGUP_TIMEOUT && ast_exists_extension(c,c->context,"T",1,c->cid.cid_num)) {
+                       if (c->_softhangup == AST_SOFTHANGUP_ASYNCGOTO) {
+                               c->_softhangup = 0;
+                       } else if (c->_softhangup == AST_SOFTHANGUP_TIMEOUT && ast_exists_extension(c,c->context,"T",1,c->cid.cid_num)) {
                                set_ext_pri(c, "T", 0); /* 0 will become 1 with the c->priority++; at the end */
                                /* If the AbsoluteTimeout is not reset to 0, we'll get an infinite loop */
                                c->whentohangup = 0;