Changeset 5714


Ignore:
Timestamp:
Dec 13, 2017 8:16:30 AM (7 years ago)
Author:
nanang
Message:

Fixed #2076:

  • Ignore transport error on completed transaction.
  • Don't disconnect call if transport error happens on transaction that is not initial INVITE transaction.
Location:
pjproject/trunk/pjsip/src
Files:
2 edited

Legend:

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

    r5701 r5714  
    42554255                tsx->method.id != PJSIP_CANCEL_METHOD) || 
    42564256            tsx->status_code == PJSIP_SC_REQUEST_TIMEOUT || 
    4257             tsx->status_code == PJSIP_SC_TSX_TIMEOUT || 
    4258             tsx->status_code == PJSIP_SC_TSX_TRANSPORT_ERROR) 
     4257            tsx->status_code == PJSIP_SC_TSX_TIMEOUT) 
    42594258        { 
    42604259            inv_set_cause(inv, tsx->status_code, &tsx->status_text); 
  • pjproject/trunk/pjsip/src/pjsip/sip_transaction.c

    r5682 r5714  
    20452045        lock_timer(tsx); 
    20462046        tsx->transport_err = (pj_status_t)-sent; 
    2047         tsx_cancel_timer(tsx, &tsx->timeout_timer); 
    2048         tsx_schedule_timer(tsx, &tsx->timeout_timer, &delay, 
    2049                            TRANSPORT_ERR_TIMER); 
     2047        /* Don't cancel timeout timer if tsx state is already 
     2048         * PJSIP_TSX_STATE_COMPLETED (see #2076). 
     2049         */ 
     2050        if (tsx->state < PJSIP_TSX_STATE_COMPLETED) { 
     2051            tsx_cancel_timer(tsx, &tsx->timeout_timer); 
     2052            tsx_schedule_timer(tsx, &tsx->timeout_timer, &delay, 
     2053                               TRANSPORT_ERR_TIMER); 
     2054        } 
    20502055        unlock_timer(tsx); 
    20512056   } 
     
    20782083        lock_timer(tsx); 
    20792084        tsx->transport_err = info->status; 
    2080         tsx_cancel_timer(tsx, &tsx->timeout_timer); 
    2081         tsx_schedule_timer(tsx, &tsx->timeout_timer, &delay, 
    2082                            TRANSPORT_ERR_TIMER); 
     2085        /* Don't cancel timeout timer if tsx state is already 
     2086         * PJSIP_TSX_STATE_COMPLETED (see #2076). 
     2087         */ 
     2088        if (tsx->state < PJSIP_TSX_STATE_COMPLETED) { 
     2089            tsx_cancel_timer(tsx, &tsx->timeout_timer); 
     2090            tsx_schedule_timer(tsx, &tsx->timeout_timer, &delay, 
     2091                               TRANSPORT_ERR_TIMER); 
     2092        } 
    20832093        unlock_timer(tsx); 
    20842094    } 
Note: See TracChangeset for help on using the changeset viewer.