]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Clear dialog on loop (backport from 1.4 by mistake)
authorOlle Johansson <oej@edvina.net>
Fri, 10 Nov 2006 20:46:25 +0000 (20:46 +0000)
committerOlle Johansson <oej@edvina.net>
Fri, 10 Nov 2006 20:46:25 +0000 (20:46 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47470 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index a3b8af2e5ade3d0535d69f2a1ccba1a83283fa7e..c2a05bdeb5fca5a1f6d65357403aa9678f946f6b 100644 (file)
@@ -10518,8 +10518,9 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int
                /* This is a call to ourself.  Send ourselves an error code and stop
                   processing immediately, as SIP really has no good mechanism for
                   being able to call yourself */
-               transmit_response(p, "482 Loop Detected", req);
-               /* We do NOT destroy p here, so that our response will be accepted */
+               transmit_response_reliable(p, "482 Loop Detected", req, 1);
+               if (!p->lastinvite)
+                       ast_set_flag(p, SIP_NEEDDESTROY);       
                return 0;
        }
        if (!ignore) {