Changeset 1878


Ignore:
Timestamp:
Mar 20, 2008 2:40:50 PM (16 years ago)
Author:
bennylp
Message:

Ticket #514: bug with handling simultaneous outgoing re-INVITE, the invite session does not check if we have an ongoing INVITE transaction (thanks Philippe Leuba)

File:
1 edited

Legend:

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

    r1814 r1878  
    20712071        pjsip_dlg_inc_lock(inv->dlg); 
    20722072 
     2073        /* Check again that we didn't receive incoming re-INVITE */ 
     2074        if (inv->invite_tsx) { 
     2075            pjsip_tx_data_dec_ref(tdata); 
     2076            pjsip_dlg_dec_lock(inv->dlg); 
     2077            return PJ_EINVALIDOP; 
     2078        } 
     2079 
     2080        /* Associate our data in outgoing invite transaction */ 
    20732081        tsx_inv_data = PJ_POOL_ZALLOC_T(inv->pool, struct tsx_inv_data); 
    20742082        tsx_inv_data->inv = inv; 
     
    32753283             tsx->role == PJSIP_ROLE_UAC) 
    32763284    { 
     3285        /* Must not have other pending INVITE transaction */ 
     3286        pj_assert(inv->invite_tsx==NULL || tsx==inv->invite_tsx); 
     3287 
    32773288        /* 
    32783289         * Handle outgoing re-INVITE 
    32793290         */ 
    3280         if (tsx->state == PJSIP_TSX_STATE_TERMINATED && 
    3281             tsx->status_code/100 == 2)  
     3291        if (tsx->state == PJSIP_TSX_STATE_CALLING) { 
     3292 
     3293            /* Save pending invite transaction */ 
     3294            inv->invite_tsx = tsx; 
     3295 
     3296        } else if (tsx->state == PJSIP_TSX_STATE_TERMINATED && 
     3297                   tsx->status_code/100 == 2)  
    32823298        { 
    32833299 
Note: See TracChangeset for help on using the changeset viewer.