Changeset 5954 for pjproject


Ignore:
Timestamp:
Mar 19, 2019 8:24:57 AM (5 years ago)
Author:
nanang
Message:

Fix #2183: Fixed bug of dialog not destroyed on late media scenario: pjsua_call_on_incoming() should decrement dialog session counter when media channel is not initialized.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c

    r5939 r5954  
    13771377    int sip_err_code = PJSIP_SC_INTERNAL_SERVER_ERROR; 
    13781378    pjmedia_sdp_session *offer=NULL; 
     1379    pj_bool_t should_dec_dlg = PJ_TRUE; 
    13791380    pj_status_t status; 
    13801381 
     
    18031804                                          &sip_err_code, PJ_TRUE, 
    18041805                                          &on_incoming_call_med_tp_complete); 
    1805         if (status == PJ_SUCCESS) { 
     1806        if (status == PJ_EPENDING) { 
     1807            /* on_incoming_call_med_tp_complete() will call 
     1808             * pjsip_dlg_dec_session(). 
     1809             */ 
     1810            should_dec_dlg = PJ_FALSE; 
     1811        } else  if (status == PJ_SUCCESS) { 
     1812            /* on_incoming_call_med_tp_complete2() will call 
     1813             * pjsip_dlg_dec_session(). 
     1814             */ 
     1815            should_dec_dlg = PJ_FALSE; 
     1816 
    18061817            status = on_incoming_call_med_tp_complete2(call_id, NULL,  
    18071818                                                       rdata, &sip_err_code,  
     
    18421853            } 
    18431854            pjsip_dlg_dec_lock(dlg); 
    1844  
    1845             pjsip_dlg_dec_session(dlg, &pjsua_var.mod); 
    18461855 
    18471856            call->inv = NULL; 
     
    19861995    if (dlg) { 
    19871996        pjsip_dlg_dec_lock(dlg); 
     1997    } 
     1998 
     1999    if (should_dec_dlg) { 
     2000        pjsip_dlg_dec_session(dlg, &pjsua_var.mod); 
    19882001    } 
    19892002 
Note: See TracChangeset for help on using the changeset viewer.