Changeset 5316


Ignore:
Timestamp:
May 25, 2016 5:25:12 AM (8 years ago)
Author:
nanang
Message:

Fix #1924: Put check whether dialog has been registered to pjsip UA before calling pjsip_ua_unregister_dlg() to avoid assertion.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsip/sip_dialog.c

    r5241 r5316  
    788788    PJ_ASSERT_RETURN(dlg->tsx_count==0, PJ_EINVALIDOP); 
    789789 
    790     /* Unregister from user agent. */ 
    791     status = pjsip_ua_unregister_dlg(dlg->ua, dlg); 
    792     if (status != PJ_SUCCESS) { 
    793         pj_assert(!"Unexpected failed unregistration!"); 
    794         return status; 
     790    /* Unregister from user agent, if it has been registered (see #1924) */ 
     791    if (dlg->dlg_set) { 
     792        status = pjsip_ua_unregister_dlg(dlg->ua, dlg); 
     793        if (status != PJ_SUCCESS) { 
     794            pj_assert(!"Unexpected failed unregistration!"); 
     795            return status; 
     796        } 
    795797    } 
    796798 
Note: See TracChangeset for help on using the changeset viewer.