On date Wednesday 2008-09-24 12:31:47 +0200, elisa_murgia phoned this: > ---------- Initial Header ----------- > > >From : "Stefano Sabatini" [EMAIL PROTECTED] > To : sofia-sip-devel@lists.sourceforge.net > Cc : > Date : Mon, 22 Sep 2008 23:46:00 +0200 > Subject : Re: [Sofia-sip-devel] Using SOFIA-SIP just as a parser > > > > Hello again, > I've tried what you have suggested me, but it seems that it can work only if > I have strings with just a single sip message. My goal is, also, to > manipulate strings which hold more than one message and to use sofia to > divide and to parse carried messages. > I used msg-make() applied to the whole string and it s useful to find the > first sip message. > > msg_t* msg=msg_make(sip_default_mclass, 0, data, -1); > > msg_t* next=msg_next(msg); > > In this way sofia seems to find the second message begin, but it's not able > to parse it. > > When I use then > > msg_extract(next) > > it returns -1, like an error occurred. > > Is there a way to divide the string before to apply msg_make()? > > Any suggestion would be very appreciated. > Regards.
I don't think you can use the sofia-sip external API to do that. What you can do is to use the code used *internally* by sofia-sip, check in: libsofia-sip-ua/sip/parser.c Maybe you could even convince the authors to export that functionality or provide a patch for that yourself... [...] Regards. -- Stefano Sabatini http://www.reilabs.com ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel