[pjsip] Bug in pj_generate_unique_string() ?

Benny Prijono bennylp at pjsip.org
Thu May 15 05:54:51 EDT 2008


On Thu, May 15, 2008 at 10:49 AM, Roland Klabunde
<roland.klabunde at freenet.de> wrote:
> Thanks, Benny. Thomas says, he has no choice, he only uses your libs :)  He
>  says it is coming from pj_init in os_core_win32.c...
>

Ah I see. You're right, it seems that the WinCE project uses
guid_simple.c. Sorry I was talking rubbish.

Cheers
 Benny

>  Never mind.
>
>  Regards
>
>
>
>  ----- Original Message -----
>  From: "Benny Prijono" <bennylp at pjsip.org>
>  To: "pjsip list" <pjsip at lists.pjsip.org>
>  Sent: Thursday, May 15, 2008 11:10 AM
>  Subject: Re: [pjsip] Bug in pj_generate_unique_string() ?
>
>
>  > Thanks Roland, I've fixed this in r1956. But actually you should use
>  > guid_win32.c on Windows rather than guid_simple.c, that's why this was
>  > not tested.
>  >
>  > Cheers
>  > Benny
>  >
>  > On Wed, May 14, 2008 at 1:29 PM, Roland Klabunde
>  > <roland.klabunde at freenet.de> wrote:
>  >> 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
>  >>
>  >>
>  >>
>  >>
>  >>
>  >>
>  >>
>  >>  _______________________________________________
>  >>  Visit our blog: http://blog.pjsip.org
>  >>
>  >>  pjsip mailing list
>  >>  pjsip at lists.pjsip.org
>  >>  http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>  >>
>  >
>  > _______________________________________________
>  > Visit our blog: http://blog.pjsip.org
>  >
>  > pjsip mailing list
>  > pjsip at lists.pjsip.org
>  > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>  >
>
>
>  _______________________________________________
>  Visit our blog: http://blog.pjsip.org
>
>  pjsip mailing list
>  pjsip at lists.pjsip.org
>  http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>




More information about the pjsip mailing list