Hi,
o Emil Kroymann on 08/08/2012 05:10 PM:
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.
shouldn't this be the same with the local SDP? Please see if you like
the attached patch.
thanks!
Stefan
diff --git a/core/AmRtpStream.cpp b/core/AmRtpStream.cpp
index 226e925..f5c115d 100644
--- a/core/AmRtpStream.cpp
+++ b/core/AmRtpStream.cpp
@@ -623,14 +623,25 @@ int AmRtpStream::init(const AmSdp& local,
++sdp_it;
}
- if (local.conn.address.empty()) setLocalIP(local_media.conn.address);
- else setLocalIP(local.conn.address);
+ // set local address - media c-line having precedence over session c-line
+ if (local_media.conn.address.empty())
+ setLocalIP(local.conn.address);
+ else
+ setLocalIP(local_media.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(local_media.payloads.empty()) {
+ // set remote address - media c-line having precedence over session c-line
+ if (remote.conn.address.empty() && remote_media.conn.address.empty()) {
+ WARN("no c= line given globally or in m= section in remote SDP\n");
+ return -1;
+ }
+ 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()) {
ERROR("local_media.payloads.empty()\n");
return -1;
}
_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev