From 7806d8fe40068570c246898366062d734095175b Mon Sep 17 00:00:00 2001 From: "jiayl@webrtc.org" Date: Wed, 26 Nov 2014 19:58:50 +0000 Subject: [PATCH] Fix an ASSERT that fires in a browser test for renegotiation. See https://code.google.com/p/chromium/issues/detail?id=293125#c33 BUG=crbug/293125 R=juberti@webrtc.org Review URL: https://webrtc-codereview.appspot.com/32429004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@7753 4adac7df-926f-26a2-2b94-8c16560cd09d --- webrtc/p2p/base/p2ptransportchannel.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/webrtc/p2p/base/p2ptransportchannel.cc b/webrtc/p2p/base/p2ptransportchannel.cc index 94e3cb35cb..d007903f50 100644 --- a/webrtc/p2p/base/p2ptransportchannel.cc +++ b/webrtc/p2p/base/p2ptransportchannel.cc @@ -88,7 +88,13 @@ class ConnectionCompare { cricket::Connection* a = const_cast(ca); cricket::Connection* b = const_cast(cb); - ASSERT(a->port()->IceProtocol() == b->port()->IceProtocol()); + // The IceProtocol is initialized to ICEPROTO_HYBRID and can be updated to + // GICE or RFC5245 when an answer SDP is set, or when a STUN message is + // received. So the port receiving the STUN message may have a different + // IceProtocol if the answer SDP is not set yet. + ASSERT(a->port()->IceProtocol() == b->port()->IceProtocol() || + a->port()->IceProtocol() == cricket::ICEPROTO_HYBRID || + b->port()->IceProtocol() == cricket::ICEPROTO_HYBRID); // Compare first on writability and static preferences. int cmp = CompareConnections(a, b);