Ignore:
Timestamp:
Jul 19, 2013 6:31:28 AM (11 years ago)
Author:
bennylp
Message:

Closed #1690: Assertion in timer in SIP transaction: Timer being rescheduled when already running

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsip/sip_transaction.c

    r4537 r4567  
    22252225    pj_status_t status; 
    22262226 
     2227    if (resched && pj_timer_entry_running(&tsx->retransmit_timer)) { 
     2228        /* We've been asked to reschedule but the timer is already rerunning. 
     2229         * This can only happen in a race condition where, between removing 
     2230         * this retransmit timer from the heap and actually scheduling it, 
     2231         * another thread has got in and rescheduled the timer itself.  In 
     2232         * this scenario, the transmission has already happened and so we 
     2233         * should just quit out immediately, without either resending the 
     2234         * message or restarting the timer. 
     2235         */ 
     2236        return PJ_SUCCESS; 
     2237    } 
     2238 
    22272239    PJ_ASSERT_RETURN(tsx->last_tx!=NULL, PJ_EBUG); 
    22282240 
     
    23332345         */ 
    23342346        lock_timer(tsx); 
     2347        tsx_cancel_timer( tsx, &tsx->timeout_timer ); 
    23352348        tsx_schedule_timer( tsx, &tsx->timeout_timer, &timeout_timer_val, 
    23362349                            TIMEOUT_TIMER); 
     
    26782691 
    26792692                lock_timer(tsx); 
     2693                tsx_cancel_timer(tsx, &tsx->timeout_timer); 
    26802694                tsx_schedule_timer( tsx, &tsx->timeout_timer, 
    26812695                                    &timeout, TIMEOUT_TIMER); 
     
    27062720             */ 
    27072721            lock_timer(tsx); 
     2722            tsx_cancel_timer(tsx, &tsx->timeout_timer); 
    27082723            if (tsx->method.id == PJSIP_INVITE_METHOD) { 
    27092724                /* Start timer H for INVITE */ 
Note: See TracChangeset for help on using the changeset viewer.