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
This commit is contained in:
jiayl@webrtc.org 2014-11-26 19:58:50 +00:00
parent a71bb6033b
commit 7806d8fe40

View File

@ -88,7 +88,13 @@ class ConnectionCompare {
cricket::Connection* a = const_cast<cricket::Connection*>(ca);
cricket::Connection* b = const_cast<cricket::Connection*>(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);