Index: webrtc/p2p/base/transportchannel.cc |
diff --git a/webrtc/p2p/base/transportchannel.cc b/webrtc/p2p/base/transportchannel.cc |
index 97a41130c7b2e282e89f26cfbe88e6b538a068d6..63d84494e5485eb55b542def562c39c9a7df1398 100644 |
--- a/webrtc/p2p/base/transportchannel.cc |
+++ b/webrtc/p2p/base/transportchannel.cc |
@@ -32,15 +32,26 @@ void TransportChannel::set_receiving(bool receiving) { |
} |
void TransportChannel::set_writable(bool writable) { |
- if (writable_ != writable) { |
- LOG_J(LS_VERBOSE, this) << "set_writable from:" << writable_ << " to " |
- << writable; |
- writable_ = writable; |
- if (writable_) { |
- SignalReadyToSend(this); |
- } |
- SignalWritableState(this); |
+ if (writable_ == writable) { |
+ return; |
+ } |
+ LOG_J(LS_VERBOSE, this) << "set_writable from:" << writable_ << " to " |
+ << writable; |
+ writable_ = writable; |
+ if (writable_) { |
+ SignalReadyToSend(this); |
+ } |
+ SignalWritableState(this); |
+} |
+ |
+void TransportChannel::set_dtls_state(DtlsTransportState state) { |
+ if (dtls_state_ == state) { |
+ return; |
} |
+ LOG_J(LS_VERBOSE, this) << "set_dtls_state from:" << dtls_state_ << " to " |
+ << state; |
+ dtls_state_ = state; |
+ SignalDtlsState(this); |
} |
} // namespace cricket |