Changeset 982


Ignore:
Timestamp:
Feb 19, 2007 10:23:14 PM (17 years ago)
Author:
bennylp
Message:

Fixed ticket #114: INVITE transaction is not destroyed immediately when ACK has the same branch as the INVITE

File:
1 edited

Legend:

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

    r974 r982  
    357357        (*mod_inv.cb.on_tsx_state_changed)(inv, tsx, e); 
    358358 
    359     /* Clear invite transaction when tsx is terminated. */ 
    360     if (tsx->state==PJSIP_TSX_STATE_TERMINATED && tsx == inv->invite_tsx) 
    361         inv->invite_tsx = NULL; 
     359    /* Clear invite transaction when tsx is confirmed. 
     360     * Previously we set invite_tsx to NULL only when transaction has 
     361     * terminated, but this didn't work when ACK has the same Via branch 
     362     * value as the INVITE (see http://www.pjsip.org/trac/ticket/113) 
     363     */ 
     364    if (tsx->state>=PJSIP_TSX_STATE_CONFIRMED && tsx == inv->invite_tsx) 
     365        inv->invite_tsx = NULL; 
    362366} 
    363367 
     
    23762380            /* Check if we have INVITE pending. */ 
    23772381            if (inv->invite_tsx && inv->invite_tsx!=tsx) { 
     2382                pj_str_t reason; 
     2383 
     2384                reason = pj_str("Another INVITE transaction in progress"); 
    23782385 
    23792386                /* Can not receive re-INVITE while another one is pending. */ 
    2380                 status = pjsip_dlg_create_response( inv->dlg, rdata, 500, NULL, 
    2381                                                     &tdata); 
     2387                status = pjsip_dlg_create_response( inv->dlg, rdata, 500,  
     2388                                                    &reason, &tdata); 
    23822389                if (status != PJ_SUCCESS) 
    23832390                    return; 
Note: See TracChangeset for help on using the changeset viewer.