Changeset 3929


Ignore:
Timestamp:
Dec 28, 2011 9:52:07 AM (8 years ago)
Author:
nanang
Message:

Fix #1433: synchronuous ICE initialization calls PJSUA_UNLOCK() only when the PJSUA lock is actually held by this thread.

File:
1 edited

Legend:

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

    r3925 r3929  
    979979    /* Wait until transport is initialized, or time out */ 
    980980    if (!async) { 
    981         PJSUA_UNLOCK(); 
     981        pj_bool_t has_pjsua_lock = PJSUA_LOCK_IS_LOCKED(); 
     982        if (has_pjsua_lock) 
     983            PJSUA_UNLOCK(); 
    982984        while (call_med->tp_ready == PJ_EPENDING) { 
    983985            pjsua_handle_events(100); 
    984986        } 
    985         PJSUA_LOCK(); 
     987        if (has_pjsua_lock) 
     988            PJSUA_LOCK(); 
    986989    } 
    987990 
Note: See TracChangeset for help on using the changeset viewer.