]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Correctly initialize retransid in SIP, and ensure that the warning when failing to...
authorTilghman Lesher <tilghman@meg.abyt.es>
Wed, 5 Mar 2008 15:17:16 +0000 (15:17 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Wed, 5 Mar 2008 15:17:16 +0000 (15:17 +0000)
(closes issue #12140)
 Reported by: slavon
 Patches:
       sch2.patch uploaded by slavon (license 288)
(Patch slightly modified by me)

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

channels/chan_sip.c
include/asterisk/sched.h

index 994a4c964e5b9d7b4be7c2614a9d44e471d0f4b8..48dc39e4a07cde35626f5e766d07c21175bf1317 100644 (file)
@@ -2033,6 +2033,7 @@ static enum sip_result __sip_reliable_xmit(struct sip_pvt *p, int seqno, int res
                ast_set_flag(pkt, FLAG_RESPONSE);
        pkt->data[len] = '\0';
        pkt->timer_t1 = p->timer_t1;    /* Set SIP timer T1 */
+       pkt->retransid = -1;
        if (fatal)
                ast_set_flag(pkt, FLAG_FATAL);
        if (pkt->timer_t1)
index 84a65a07ac809cca63e89b20748b9661ac6453a0..5476dadf76869e93d5f6ccfc7c7121cefadb147f 100644 (file)
@@ -38,7 +38,7 @@ extern "C" {
 #define AST_SCHED_DEL(sched, id) \
        do { \
                int _count = 0; \
-               while (id > -1 && ast_sched_del(sched, id) && _count++ < 10) \
+               while (id > -1 && ast_sched_del(sched, id) && ++_count < 10) \
                        usleep(1); \
                if (_count == 10) \
                        ast_log(LOG_WARNING, "Unable to cancel schedule ID %d.  This is probably a bug (%s: %s, line %d).\n", id, __FILE__, __PRETTY_FUNCTION__, __LINE__); \