mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
RTC: Fix error code for DTLS
This commit is contained in:
parent
c33dfd2313
commit
17bef0402e
2 changed files with 2 additions and 2 deletions
|
@ -478,7 +478,7 @@ srs_error_t SrsDtls::do_handshake()
|
||||||
|
|
||||||
// Fatal SSL error, for example, no available suite when peer is DTLS 1.0 while we are DTLS 1.2.
|
// Fatal SSL error, for example, no available suite when peer is DTLS 1.0 while we are DTLS 1.2.
|
||||||
if (r0 < 0 && (r1 != SSL_ERROR_NONE && r1 != SSL_ERROR_WANT_READ && r1 != SSL_ERROR_WANT_WRITE)) {
|
if (r0 < 0 && (r1 != SSL_ERROR_NONE && r1 != SSL_ERROR_WANT_READ && r1 != SSL_ERROR_WANT_WRITE)) {
|
||||||
return srs_error_new(ERROR_OpenSslBIOWrite, "handshake r0=%d, r1=%d", r0, r1);
|
return srs_error_new(ERROR_RTC_DTLS, "handshake r0=%d, r1=%d", r0, r1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// OK, Handshake is done, note that it maybe done many times.
|
// OK, Handshake is done, note that it maybe done many times.
|
||||||
|
|
|
@ -159,7 +159,7 @@ srs_error_t MockDtls::do_handshake()
|
||||||
int r0 = SSL_do_handshake(dtls);
|
int r0 = SSL_do_handshake(dtls);
|
||||||
int r1 = SSL_get_error(dtls, r0);
|
int r1 = SSL_get_error(dtls, r0);
|
||||||
if (r0 < 0 && (r1 != SSL_ERROR_NONE && r1 != SSL_ERROR_WANT_READ && r1 != SSL_ERROR_WANT_WRITE)) {
|
if (r0 < 0 && (r1 != SSL_ERROR_NONE && r1 != SSL_ERROR_WANT_READ && r1 != SSL_ERROR_WANT_WRITE)) {
|
||||||
return srs_error_new(ERROR_OpenSslBIOWrite, "handshake r0=%d, r1=%d", r0, r1);
|
return srs_error_new(ERROR_RTC_DTLS, "handshake r0=%d, r1=%d", r0, r1);
|
||||||
}
|
}
|
||||||
if (r1 == SSL_ERROR_NONE) {
|
if (r1 == SSL_ERROR_NONE) {
|
||||||
handshake_done_for_us = true;
|
handshake_done_for_us = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue