Don't "ignore" on CANCEL (bug #2670)
authorMark Spencer <markster@digium.com>
Tue, 19 Oct 2004 03:17:26 +0000 (03:17 +0000)
committerMark Spencer <markster@digium.com>
Tue, 19 Oct 2004 03:17:26 +0000 (03:17 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4034 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 5e37ce4..1a7f04b 100755 (executable)
@@ -7045,7 +7045,7 @@ static int handle_request(struct sip_pvt *p, struct sip_request *req, struct soc
                if (p->icseq && (p->icseq > seqno)) {
                        ast_log(LOG_DEBUG, "Ignoring too old packet packet %d (expecting >= %d)\n", seqno, p->icseq);
                        return -1;
-               } else if (p->icseq && (p->icseq == seqno)) {
+               } else if (p->icseq && (p->icseq == seqno) && (strcasecmp(cmd, "CANCEL") || p->alreadygone)) {
                        /* ignore means "don't do anything with it" but still have to 
                           respond appropriately.  We do this if we receive a repeat of
                           the last sequence number  */