Changeset 4703 for pjproject


Ignore:
Timestamp:
Jan 7, 2014 10:55:10 AM (11 years ago)
Author:
riza
Message:

Re #1721: Clear invite transaction before calling on_call_tsx_state (on transaction terminated)

File:
1 edited

Legend:

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

    r4695 r4703  
    656656    (*inv_state_handler[inv->state])(inv, e); 
    657657 
     658    /* Clear invite transaction when tsx is terminated.  
     659     * Necessary for app that wants to send a new re-INVITE request immediately 
     660     * after the transaction is terminated.  
     661     */ 
     662    if (tsx->state==PJSIP_TSX_STATE_TERMINATED  && tsx == inv->invite_tsx) { 
     663        inv->invite_tsx = NULL;     
     664 
     665        if (inv->last_answer) { 
     666                pjsip_tx_data_dec_ref(inv->last_answer); 
     667                inv->last_answer = NULL; 
     668        } 
     669    } 
     670 
    658671    /* Call on_tsx_state. CANCEL request is a special case and has been 
    659672     * reported earlier in inv_respond_incoming_cancel() 
     
    671684     * value as the INVITE (see http://www.pjsip.org/trac/ticket/113) 
    672685     */ 
    673     if (tsx->state>=PJSIP_TSX_STATE_CONFIRMED && tsx == inv->invite_tsx) { 
    674         inv->invite_tsx = NULL; 
     686    if (tsx->state>=PJSIP_TSX_STATE_CONFIRMED && tsx == inv->invite_tsx) {       
     687        inv->invite_tsx = NULL; 
     688 
    675689        if (inv->last_answer) { 
    676690                pjsip_tx_data_dec_ref(inv->last_answer); 
Note: See TracChangeset for help on using the changeset viewer.