From e999bd087bcc7307c9e9b253e78837486213d124 Mon Sep 17 00:00:00 2001 From: "mallinath@webrtc.org" Date: Wed, 13 Aug 2014 06:05:55 +0000 Subject: [PATCH] Removing ASSERT for tcp candidate for port 0 and 9, as Android clients may not be called with set_allow_tcp_listen(false). This CL will also sends tcp candidate in RFC 6544 format. BUG=https://code.google.com/p/webrtc/issues/detail?id=3677 R=braveyao@webrtc.org Review URL: https://webrtc-codereview.appspot.com/14119004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@6880 4adac7df-926f-26a2-2b94-8c16560cd09d --- talk/app/webrtc/webrtcsdp.cc | 9 +-------- talk/app/webrtc/webrtcsdp_unittest.cc | 2 +- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/talk/app/webrtc/webrtcsdp.cc b/talk/app/webrtc/webrtcsdp.cc index 2eb5fb32bd..09e5cbd9c3 100644 --- a/talk/app/webrtc/webrtcsdp.cc +++ b/talk/app/webrtc/webrtcsdp.cc @@ -1720,14 +1720,7 @@ void BuildCandidate(const std::vector& candidates, } if (it->protocol() == cricket::TCP_PROTOCOL_NAME) { - // In case of WebRTC, candidate must be always "active" only. That means - // it should have port number either 0 or 9. - ASSERT(it->address().port() == 0 || - it->address().port() == cricket::DISCARD_PORT); - ASSERT(it->tcptype() == cricket::TCPTYPE_ACTIVE_STR); - // TODO(mallinath) : Uncomment below line once WebRTCSdp capable of - // parsing RFC 6544. - // os << kTcpCandidateType << " " << it->tcptype() << " "; + os << kTcpCandidateType << " " << it->tcptype() << " "; } // Extensions diff --git a/talk/app/webrtc/webrtcsdp_unittest.cc b/talk/app/webrtc/webrtcsdp_unittest.cc index 9f5e1eba6e..3629347d4c 100644 --- a/talk/app/webrtc/webrtcsdp_unittest.cc +++ b/talk/app/webrtc/webrtcsdp_unittest.cc @@ -1631,7 +1631,7 @@ TEST_F(WebRtcSdpTest, SerializeCandidates) { // TODO(mallinath) : Enable this test once WebRTCSdp capable of parsing // RFC 6544. -TEST_F(WebRtcSdpTest, DISABLED_SerializeTcpCandidates) { +TEST_F(WebRtcSdpTest, SerializeTcpCandidates) { Candidate candidate( "", ICE_CANDIDATE_COMPONENT_RTP, "tcp", rtc::SocketAddress("192.168.1.5", 9), kCandidatePriority,