Changeset 896 for pjproject


Ignore:
Timestamp:
Jan 22, 2007 7:10:17 PM (18 years ago)
Author:
bennylp
Message:

Give more useful information when assertion fails in pj_thread_this()

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

Legend:

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

    r840 r896  
    508508#if PJ_HAS_THREADS 
    509509    pj_thread_t *rec = pj_thread_local_get(thread_tls_id); 
    510     pj_assert(rec != NULL); 
     510     
     511    if (rec == NULL) { 
     512        pj_assert(!"Calling pjlib from unknown/external thread. You must " 
     513                   "register external threads with pj_thread_register() " 
     514                   "before calling any pjlib functions."); 
     515    } 
    511516 
    512517    /* 
  • pjproject/trunk/pjlib/src/pj/os_core_win32.c

    r839 r896  
    430430{ 
    431431    pj_thread_t *rec = pj_thread_local_get(thread_tls_id); 
    432     pj_assert(rec != NULL); 
     432 
     433    if (rec == NULL) { 
     434        pj_assert(!"Calling pjlib from unknown/external thread. You must " 
     435                   "register external threads with pj_thread_register() " 
     436                   "before calling any pjlib functions."); 
     437    } 
    433438 
    434439    /* 
Note: See TracChangeset for help on using the changeset viewer.