Changeset 2890 for pjproject


Ignore:
Timestamp:
Aug 17, 2009 2:42:33 PM (15 years ago)
Author:
nanang
Message:

Ticket #833: Updated previous fix for Session Timer (timer callback gets pending INVITE is in progress), instead of just quitting the callback, it may be better to reschedule the timer (for five seconds).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsip-ua/sip_timer.c

    r2889 r2890  
    333333    PJ_UNUSED_ARG(timer_heap); 
    334334 
    335     /* Must NOT have a pending INVITE transaction */ 
    336     if (inv->invite_tsx != NULL) 
     335    /* When there is a pending INVITE transaction, delay/reschedule this timer 
     336     * for five seconds to cover the case that pending INVITE fails and the 
     337     * previous session is still active. If the pending INVITE is successful,  
     338     * timer state will be updated, i.e: restarted or stopped. 
     339     */ 
     340    if (inv->invite_tsx != NULL) { 
     341        pj_time_val delay = {5}; 
     342 
     343        inv->timer->timer.id = 1; 
     344        pjsip_endpt_schedule_timer(inv->dlg->endpt, &inv->timer->timer, &delay); 
    337345        return; 
     346    } 
    338347 
    339348    /* Lock dialog. */ 
Note: See TracChangeset for help on using the changeset viewer.