Improve DTLS logging.
See b/142641135. Bug: None Change-Id: I59d74b0d6c53a421d8104cc5455bab2e8dcf27d4 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/166048 Commit-Queue: Henrik Boström <hbos@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30280}
This commit is contained in:

committed by
Commit Bot

parent
c7bce99540
commit
e2747b8e0d
@ -419,8 +419,16 @@ int DtlsTransport::SendPacket(const char* data,
|
|||||||
: -1;
|
: -1;
|
||||||
}
|
}
|
||||||
case DTLS_TRANSPORT_FAILED:
|
case DTLS_TRANSPORT_FAILED:
|
||||||
|
// Can't send anything when we're failed.
|
||||||
|
RTC_LOG(LS_ERROR)
|
||||||
|
<< ToString()
|
||||||
|
<< ": Couldn't send packet due to DTLS_TRANSPORT_FAILED.";
|
||||||
|
return -1;
|
||||||
case DTLS_TRANSPORT_CLOSED:
|
case DTLS_TRANSPORT_CLOSED:
|
||||||
// Can't send anything when we're closed.
|
// Can't send anything when we're closed.
|
||||||
|
RTC_LOG(LS_ERROR)
|
||||||
|
<< ToString()
|
||||||
|
<< ": Couldn't send packet due to DTLS_TRANSPORT_CLOSED.";
|
||||||
return -1;
|
return -1;
|
||||||
default:
|
default:
|
||||||
RTC_NOTREACHED();
|
RTC_NOTREACHED();
|
||||||
@ -510,8 +518,16 @@ void DtlsTransport::OnWritableState(rtc::PacketTransportInternal* transport) {
|
|||||||
// Do nothing.
|
// Do nothing.
|
||||||
break;
|
break;
|
||||||
case DTLS_TRANSPORT_FAILED:
|
case DTLS_TRANSPORT_FAILED:
|
||||||
|
// Should not happen. Do nothing.
|
||||||
|
RTC_LOG(LS_ERROR)
|
||||||
|
<< ToString()
|
||||||
|
<< ": OnWritableState() called in state DTLS_TRANSPORT_FAILED.";
|
||||||
|
break;
|
||||||
case DTLS_TRANSPORT_CLOSED:
|
case DTLS_TRANSPORT_CLOSED:
|
||||||
// Should not happen. Do nothing.
|
// Should not happen. Do nothing.
|
||||||
|
RTC_LOG(LS_ERROR)
|
||||||
|
<< ToString()
|
||||||
|
<< ": OnWritableState() called in state DTLS_TRANSPORT_CLOSED.";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user