[Freeswitch-svn] [commit] r7769 - freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp

Freeswitch SVN mikej at freeswitch.org
Sat Mar 1 23:13:52 EST 2008


Author: mikej
Date: Sat Mar  1 23:13:51 2008
New Revision: 7769

Modified:
   freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/sdp_print.c

Log:
break rfc3264 rejected m line support so t.38 works (will need to work this into an option)

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/sdp_print.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/sdp_print.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/sdp_print.c	Sat Mar  1 23:13:51 2008
@@ -565,6 +565,7 @@
 {
   char const *media, *proto;
   sdp_rtpmap_t *rm;
+  int print_rejected = 0;
 
   sdp_mode_t session_mode = sdp_sendrecv;
 
@@ -593,11 +594,13 @@
     default:              proto = m->m_proto_name; break;
     }
     
+    if (print_rejected || m->m_rtpmaps || m->m_format) {
     if (m->m_number_of_ports <= 1)
       sdp_printf(p, "m=%s %u %s", media, m->m_port, proto);
     else
       sdp_printf(p, "m=%s %u/%u %s", 
 		 media, m->m_port, m->m_number_of_ports, proto);
+    }
 
     if (m->m_rtpmaps) {
       for (rm = m->m_rtpmaps; rm; rm = rm->rm_next) {
@@ -612,13 +615,13 @@
       for (; l; l = l->l_next)
 	sdp_printf(p, " %s", l->l_text);
     }
-    else {
+    else if (print_rejected) {
       sdp_printf(p, " 19");      /* SDP syntax requires at least one format.
 				    19 is used by nobody, right?. */
     }
 
 
-    sdp_printf(p, CRLF);
+    if (print_rejected || m->m_rtpmaps || m->m_format) sdp_printf(p, CRLF);
 
     if (m->m_information)
       print_information(p, m->m_information);



More information about the Freeswitch-svn mailing list