From: Joshua Colp Date: Mon, 28 Jan 2008 19:04:53 +0000 (+0000) Subject: Fix up two scheduling issues. In one instance a scheduled item was not deleted when... X-Git-Tag: 1.6.0-beta2~2^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=212db7a0d7391d89b8b2af0a678e7c947f0c0250;p=thirdparty%2Fasterisk.git Fix up two scheduling issues. In one instance a scheduled item was not deleted when it should have been and in the other it was scheduled again when it shouldn't have been. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@100632 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index b13759e210..2cb8988b7a 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -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);