Changeset 3918 for pjproject


Ignore:
Timestamp:
Dec 20, 2011 10:27:39 AM (13 years ago)
Author:
ming
Message:

Fixed #1430: Crash when dialog is prematurely destroyed during outgoing call.
We do this by temporarily incrementing dialog session until the invite session is created.

File:
1 edited

Legend:

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

    r3908 r3918  
    365365    pjsip_dlg_inc_lock(dlg); 
    366366 
     367    /* Decrement dialog session. */ 
     368    pjsip_dlg_dec_session(dlg, &pjsua_var.mod); 
     369 
    367370    if (status != PJ_SUCCESS) { 
    368371        pjsua_perror(THIS_FILE, "Error initializing media channel", status); 
     
    723726        goto on_error; 
    724727    } 
     728 
     729    /* Temporarily increment dialog session. Without this, dialog will be 
     730     * prematurely destroyed if dec_lock() is called on the dialog before 
     731     * the invite session is created. 
     732     */ 
     733    pjsip_dlg_inc_session(dlg, &pjsua_var.mod); 
    725734 
    726735    /* Done. */ 
Note: See TracChangeset for help on using the changeset viewer.