Changeset 233


Ignore:
Timestamp:
Feb 26, 2006 9:20:52 PM (19 years ago)
Author:
bennylp
Message:

Fixed bug pj_thread_register() when same thread is re-registered with different descriptor

Location:
pjproject/trunk/pjlib/src/pj
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/src/pj/config.c

    r231 r233  
    2222 
    2323static const char *id = "config.c"; 
    24 const char *PJ_VERSION = "0.5.1.3"; 
     24const char *PJ_VERSION = "0.5.2"; 
    2525 
    2626PJ_DEF(void) pj_dump_config(void) 
  • pjproject/trunk/pjlib/src/pj/os_core_linux_kernel.c

    r66 r233  
    252252    /* If a thread descriptor has been registered before, just return it. */ 
    253253    if (pj_thread_local_get (thread_tls_id) != 0) { 
    254         *ptr_thread = (pj_thread_t*)pj_thread_local_get (thread_tls_id); 
    255         return PJ_SUCCESS; 
     254        // 2006-02-26 bennylp: 
     255        //  This wouldn't work in all cases!. 
     256        //  If thread is created by external module (e.g. sound thread), 
     257        //  thread may be reused while the pool used for the thread descriptor 
     258        //  has been deleted by application. 
     259        //*thread_ptr = (pj_thread_t*)pj_thread_local_get (thread_tls_id); 
     260        //return PJ_SUCCESS; 
    256261    } 
    257262 
  • pjproject/trunk/pjlib/src/pj/os_core_unix.c

    r150 r233  
    190190    /* If a thread descriptor has been registered before, just return it. */ 
    191191    if (pj_thread_local_get (thread_tls_id) != 0) { 
    192         *ptr_thread = (pj_thread_t*)pj_thread_local_get (thread_tls_id); 
    193         return PJ_SUCCESS; 
     192        // 2006-02-26 bennylp: 
     193        //  This wouldn't work in all cases!. 
     194        //  If thread is created by external module (e.g. sound thread), 
     195        //  thread may be reused while the pool used for the thread descriptor 
     196        //  has been deleted by application. 
     197        //*thread_ptr = (pj_thread_t*)pj_thread_local_get (thread_tls_id); 
     198        //return PJ_SUCCESS; 
    194199    } 
    195200 
  • pjproject/trunk/pjlib/src/pj/os_core_win32.c

    r125 r233  
    203203    /* If a thread descriptor has been registered before, just return it. */ 
    204204    if (pj_thread_local_get (thread_tls_id) != 0) { 
    205         *thread_ptr = (pj_thread_t*)pj_thread_local_get (thread_tls_id); 
    206         return PJ_SUCCESS; 
     205        // 2006-02-26 bennylp: 
     206        //  This wouldn't work in all cases!. 
     207        //  If thread is created by external module (e.g. sound thread), 
     208        //  thread may be reused while the pool used for the thread descriptor 
     209        //  has been deleted by application. 
     210        //*thread_ptr = (pj_thread_t*)pj_thread_local_get (thread_tls_id); 
     211        //return PJ_SUCCESS; 
    207212    } 
    208213 
Note: See TracChangeset for help on using the changeset viewer.