Fix up two scheduling issues. In one instance a scheduled item was not deleted when...
authorJoshua Colp <jcolp@digium.com>
Mon, 28 Jan 2008 19:04:53 +0000 (19:04 +0000)
committerJoshua Colp <jcolp@digium.com>
Mon, 28 Jan 2008 19:04:53 +0000 (19:04 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@100632 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index b13759e..2cb8988 100644 (file)
@@ -2820,8 +2820,6 @@ static enum sip_result __sip_reliable_xmit(struct sip_pvt *p, int seqno, int res
                append_history(pkt->owner, "XmitErr", "%s", pkt->is_fatal ? "(Critical)" : "(Non-critical)");
                return AST_FAILURE;
        } else {
-               /* Schedule retransmission */
-               pkt->retransid = ast_sched_add_variable(sched, siptimer_a, retrans_pkt, pkt, 1);
                return AST_SUCCESS;
        }
 }
@@ -2946,6 +2944,7 @@ static void __sip_ack(struct sip_pvt *p, int seqno, int resp, int sipmethod)
                                if (sipdebug)
                                        ast_debug(4, "** SIP TIMER: Cancelling retransmit of packet (reply received) Retransid #%d\n", cur->retransid);
                        }
+                       AST_SCHED_DEL(sched, cur->retransid);
                        UNLINK(cur, p->packets, prev);
                        dialog_unref(cur->owner);
                        ast_free(cur);