Index: webrtc/pc/datachannel.cc |
diff --git a/webrtc/pc/datachannel.cc b/webrtc/pc/datachannel.cc |
index ce0aa14d4e3c2ee4afa6d917f56941bbce7f61ea..28c090dee66fde7320ed4f4095cf95dd6689193a 100644 |
--- a/webrtc/pc/datachannel.cc |
+++ b/webrtc/pc/datachannel.cc |
@@ -282,8 +282,9 @@ void DataChannel::RemotePeerRequestClose() { |
} |
void DataChannel::SetSctpSid(int sid) { |
- RTC_DCHECK(config_.id < 0 && sid >= 0 && |
- data_channel_type_ == cricket::DCT_SCTP); |
+ RTC_DCHECK_LT(config_.id, 0); |
+ RTC_DCHECK_GE(sid, 0); |
+ RTC_DCHECK_EQ(data_channel_type_, cricket::DCT_SCTP); |
if (config_.id == sid) { |
return; |
} |
@@ -618,8 +619,10 @@ void DataChannel::QueueControlMessage(const rtc::CopyOnWriteBuffer& buffer) { |
bool DataChannel::SendControlMessage(const rtc::CopyOnWriteBuffer& buffer) { |
bool is_open_message = handshake_state_ == kHandshakeShouldSendOpen; |
- RTC_DCHECK(data_channel_type_ == cricket::DCT_SCTP && writable_ && |
- config_.id >= 0 && (!is_open_message || !config_.negotiated)); |
+ RTC_DCHECK_EQ(data_channel_type_, cricket::DCT_SCTP); |
+ RTC_DCHECK(writable_); |
+ RTC_DCHECK_GE(config_.id, 0); |
+ RTC_DCHECK(!is_open_message || !config_.negotiated); |
cricket::SendDataParams send_params; |
send_params.sid = config_.id; |