[OpenSER-Devel] No result using function parse_uri()

Matheus Araújo Aguiar matheus.pit at gmail.com
Mon Apr 28 22:23:06 CEST 2008


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
matheus.pit at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openser.org/pipermail/devel/attachments/20080428/956c35be/attachment.htm 


More information about the Devel mailing list