[pjsip] Problem with pj_ansi_snprintf

Benny Prijono bennylp at pjsip.org
Thu Sep 13 16:59:30 EDT 2007


Samuel Vinson wrote:
> Hi,
> 
> On windows, when I use (len = 0, the case of empty pj_str)
>     printf("%.*s%s<%s:>\n",len,(char *)NULL,  (len?" " : ""), "sip");
> I obtain and it's correct:
>     <sip:>
> 
> when I use
>     pj_ansi_snprintf(ptr, 40, "%.*s%s<%s:>", len, (char *)NULL,  (len?" 
> " : ""),"sip");
>     printf("%s", ptr);
> I obtain and it's correct:
>     <sip:>
> 
> On nintendo DS, when
> I use the same statement, I obtain :
>     - printf -> (null)<sip:>
>     - pj_ansi_snprintf -> (null)<sip:>
> 
> Where do you think is the problem ?
>     - libc ?
>     - gcc ?


It's libc problem (maybe it's using uC-libc or newlib?)

> Because this problem I must define force_client field :-(

What if you specify a display name in account id, like:

   acc.id = pj_str("Name <sip:name at host>");

  -benny

> Thanks
> 
> Samuel








More information about the pjsip mailing list