Hi Matheus, I was referring to the "uri" variable....Is it a typo in your reply? It should be sip_uri* type :)
Check if the string you pass to "parse_uri" is not empty and try to see if there are any fields set in the structure after parsing. Regards, Bogdan Matheus Araújo Aguiar wrote: > Hi Bogdan, > > I declare it like this: struct sip_msg* uri; > before using, i allocate space for it using function pkg_malloc(); > > cya > > On Mon, Apr 28, 2008 at 6:01 PM, Bogdan-Andrei Iancu > <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: > > Hi Matheus, > > How do you declare the "uri" (third param) variable? > > Regards, > Bogdan > > Matheus Araújo Aguiar wrote: > > Hello everyone, > > I'm coding an extension to OpenSER and I'm getting no result > from the function parse_uri(). > The code is like this: > > struct to_body* b; > ... > b = (struct to_body*)msg->from->parsed; /* msg > is the struct sip_msg received, the headers From and To have > already been parsed, and i can show their uri on the screen > without trouble */ > > if(parse_uri(b->uri.s, b->uri.len, uri) < 0){ > ... (error msgs and etc) ... > } > else { > user = uri->user; > host = uri->host; > LM_DBG("user %*.s host %*.s\n", user.len, > user.s, host.len, host.s ); > } > > What I get on the screen after this "printout" is nothing, the > strings user.s and host.s seem to be empty. > > I think that I'm doing everything right, and I cannot see what > I'm doing wrong here. So I'd appreciate any kind of help with > this problem. > > Best regards, > > -- > Matheus Araújo Aguiar > Computer Science Student > [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> > > ------------------------------------------------------------------------ > > _______________________________________________ > Devel mailing list > Devel@lists.openser.org <mailto:Devel@lists.openser.org> > http://lists.openser.org/cgi-bin/mailman/listinfo/devel > > > > > > > -- > Matheus Araújo Aguiar > Computer Science Student > [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> _______________________________________________ Devel mailing list Devel@lists.openser.org http://lists.openser.org/cgi-bin/mailman/listinfo/devel