[pjsip] Bug in pj_generate_unique_string() ?

Roland Klabunde roland.klabunde at freenet.de
Wed May 14 08:29:56 EDT 2008


Hi Benny,

I got this message from Thomas:

<snip>
Hi,

I found a bug in the file "os_core_win32.c"

The function pj_generate_unique_string() is called before initiializing 
mutex but needs access to it.
You should change it this way:



--------------------------------------------------------------------------------


/* Initialize critical section. */

if ((rc=init_mutex(&critical_section_mutex, "pj%p")) != PJ_SUCCESS)
    return rc;

/* Init random seed. */
/* Or probably not. Let application in charge of this */
/* pj_srand( GetCurrentProcessId() ); */
/* Startup GUID. */

guid.ptr = dummy_guid;
pj_generate_unique_string( &guid );

</snip>

Nearly the latest SVN version.

Regards










More information about the pjsip mailing list