Thu 02 Dec 2004 05:06:41 PM UTC, original submission:
Doing this:
osip_message_init(&sip);
osip_message_parse2(sip,msg_test1, sizeof(msg_test1));
osip_message_to_str(sip,&buf);
fprintf(stdout,"mess:\n%sHERE THE MESSAGE ENDS\n------<<\n",buf);
osip_message_free(sip);
osip_message_init(&sip);
osip_message_parse2(sip,msg_test2, sizeof(msg_test2));
osip_message_to_str(sip,&buf);
fprintf(stdout,"mess:\n%sHERE THE MESSAGE ENDS\n------<<\n",buf);
osip_message_free(sip);
leads to a correct looking message string (second message),
but is is too long and has some garbage at the end.
Best way to see, is to use less, because the character may be
non printable. I used libosip2-2.0.9. I looked into the code but
could not find something obvious.
I attached an example file that always reproduces the bug on my machine.
p.s. I like your work and use it for my master thesis, which wil be a sip proxy. Other stacks force the software into their architecture, that was the main reason to choose osip.
|