Hi,

there is a problem with the handling of local and global c= lines in
the remote sdp. The c= line from the m= section should take precedence
over the global c= line, but this is implemented the other way round in
current sems master. The attached patch fixes this.

Regards,
Emil

-- 
Emil Kroymann
VoIP Services Engineer

Email: [email protected]
Tel: +49-30-203899885
Mobile: +49-176-38389303

ISACO GmbH
Kurfürstenstraße 79
10787 Berlin
Germany

Amtsgericht Charlottenburg, HRB 112464B
Geschäftsführer: Daniel Frommherz

diff --git a/core/AmRtpStream.cpp b/core/AmRtpStream.cpp
index 226e925..fb4083b 100644
--- a/core/AmRtpStream.cpp
+++ b/core/AmRtpStream.cpp
@@ -623,11 +623,16 @@ int AmRtpStream::init(const AmSdp& local,
     ++sdp_it;
   }
 
+  if (remote.conn.address.empty() && remote_media.conn.address.empty()) {
+    ERROR("no c= line given globally or in m= section");
+    return -1;
+  }
+
   if (local.conn.address.empty()) setLocalIP(local_media.conn.address);
   else setLocalIP(local.conn.address);
   setPassiveMode(remote_media.dir == SdpMedia::DirActive || force_passive_mode);
-  if (remote.conn.address.empty()) setRAddr(remote_media.conn.address, remote_media.port);
-  else setRAddr(remote.conn.address, remote_media.port);
+  if (remote_media.conn.address.empty()) setRAddr(remote.conn.address, remote_media.port);
+  else setRAddr(remote_media.conn.address, remote_media.port);
 
   if(local_media.payloads.empty()) {
 

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to