Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(188)

Unified Diff: webrtc/pc/channel.cc

Issue 2542233002: Relaxing DCHECK for packets sent before SRTP is enabled. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/pc/channel.cc
diff --git a/webrtc/pc/channel.cc b/webrtc/pc/channel.cc
index f3c3211fdfbf2d5f5f42ba52f4dd2f26c81d72da..eb2f6340ea2482a6a6d455412864a7a91723be5f 100644
--- a/webrtc/pc/channel.cc
+++ b/webrtc/pc/channel.cc
@@ -727,10 +727,16 @@ bool BaseChannel::SendPacket(bool rtcp,
// Update the length of the packet now that we've added the auth tag.
packet->SetSize(len);
} else if (secure_required_) {
- // This is a double check for something that supposedly can't happen.
- LOG(LS_ERROR) << "Can't send outgoing " << PacketType(rtcp)
- << " packet when SRTP is inactive and crypto is required";
-
+ // The audio/video engines may attempt to send RTCP packets as soon as the
+ // streams are created, so don't treat this as an error for RTCP.
+ // See: https://bugs.chromium.org/p/webrtc/issues/detail?id=6809
+ if (rtcp) {
+ return false;
+ }
+ // However, there shouldn't be any RTP packets sent before SRTP is set up
+ // (and SetSend(true) is called).
+ LOG(LS_ERROR) << "Can't send outgoing RTP packet when SRTP is inactive"
+ << " and crypto is required";
RTC_DCHECK(false);
return false;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698