Ignore:
Timestamp:
Nov 5, 2018 2:40:54 AM (6 years ago)
Author:
ming
Message:

Fixed #2159: Add synchronization for Endpoint::libRegisterThread()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsua2/endpoint.cpp

    r5899 r5904  
    17111711    status = pj_thread_register(name.c_str(), *desc, &thread); 
    17121712    if (status == PJ_SUCCESS) { 
     1713        std::lock_guard<std::mutex> guard(threadDescMutex); 
    17131714        threadDescMap[thread] = desc; 
    17141715    } else { 
     
    17211722{ 
    17221723    if (pj_thread_is_registered()) { 
     1724        std::lock_guard<std::mutex> guard(threadDescMutex); 
    17231725        /* Recheck again if it exists in the thread description map */ 
    17241726        return (threadDescMap.find(pj_thread_this()) != threadDescMap.end()); 
Note: See TracChangeset for help on using the changeset viewer.