diff --git a/talk/app/webrtc/webrtcsession.cc b/talk/app/webrtc/webrtcsession.cc index 50221ac992..2d040291a6 100644 --- a/talk/app/webrtc/webrtcsession.cc +++ b/talk/app/webrtc/webrtcsession.cc @@ -1397,7 +1397,9 @@ bool WebRtcSession::UseCandidate( } // TODO(bemasc): If state is Completed, go back to Connected. } else { - LOG(LS_WARNING) << error; + if (!error.empty()) { + LOG(LS_WARNING) << error; + } } return true; } diff --git a/talk/p2p/base/transport.cc b/talk/p2p/base/transport.cc index 0090c078fb..8261f723eb 100644 --- a/talk/p2p/base/transport.cc +++ b/talk/p2p/base/transport.cc @@ -1,6 +1,6 @@ /* * libjingle - * Copyright 2004--2005, Google Inc. + * Copyright 2004, Google Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -405,6 +405,12 @@ bool Transport::VerifyCandidate(const Candidate& cand, std::string* error) { // Disallow all ports below 1024, except for 80 and 443 on public addresses. int port = cand.address().port(); + if (port == 0) { + // Expected for active-only candidates per + // http://tools.ietf.org/html/rfc6544#section-4.5 so no error. + *error = ""; + return false; + } if (port < 1024) { if ((port != 80) && (port != 443)) { *error = "candidate has port below 1024, but not 80 or 443";