Hi,

I did a checkout of the darcs repository a few days ago, and now most or all
of the SDP fields below come out gibberish (long sequences of undisplayable
characters) after parsing.

Linked against 1.12.4 libraries, this code works fine. Can this be fixed?



   sdp_parser_t *parser = sdp_parse(ssc->ssc_home,
sip->sip_payload->pl_data, sip->sip_payload->pl_len, 0);
   sdp_session_t *sdp = sdp_session(parser);

   sdp_attribute_t *attribute = sdp->sdp_media->m_attributes;

   // first: contenttype and to_path
   while (attribute != NULL) {
     if (strcmp(attribute->a_name, "accept-types") == 0)
       my_contenttype = attribute->a_value;
       else if (strcmp(attribute->a_name, "path") == 0)
         my_to_path = attribute->a_value;

       attribute = attribute->a_next;
   }

   // then: ipaddress
   sdp_connection_t *connection = sdp->sdp_connection;
   my_ipaddress = connection->c_address;

   // finally, the senderport
   sdp_media_t *media = sdp->sdp_media;
   sprintf(my_senderport, "%lu", media->m_port); // convert unsigned long
to string

   sdp_parser_free(parser);



Thanks,
Jan
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel

Reply via email to