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
This commit is contained in:
mallinath@webrtc.org
2014-08-13 06:05:55 +00:00
parent afb554f404
commit e999bd087b
2 changed files with 2 additions and 9 deletions

View File

@@ -1720,14 +1720,7 @@ void BuildCandidate(const std::vector<Candidate>& 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

View File

@@ -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,