mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
RTC: Refine DTLS
This commit is contained in:
parent
e7261e1ca6
commit
2f50c4eb1a
1 changed files with 7 additions and 7 deletions
|
@ -476,17 +476,17 @@ srs_error_t SrsDtls::do_handshake()
|
|||
// Trace the detail of DTLS packet.
|
||||
trace((uint8_t*)out_bio_data, out_bio_len, false);
|
||||
|
||||
if (out_bio_len > 0 && (err = callback->write_dtls_data(out_bio_data, out_bio_len)) != srs_success) {
|
||||
return srs_error_wrap(err, "dtls send size=%u, data=[%s]", out_bio_len,
|
||||
srs_string_dumps_hex((char*)out_bio_data, out_bio_len, 32).c_str());
|
||||
}
|
||||
|
||||
if (handshake_done) {
|
||||
if (((err = callback->on_dtls_handshake_done()) != srs_success)) {
|
||||
return srs_error_wrap(err, "dtls done");
|
||||
}
|
||||
}
|
||||
|
||||
if (out_bio_len > 0 && (err = callback->write_dtls_data(out_bio_data, out_bio_len)) != srs_success) {
|
||||
return srs_error_wrap(err, "dtls send size=%u, data=[%s]", out_bio_len,
|
||||
srs_string_dumps_hex((char*)out_bio_data, out_bio_len, 32).c_str());
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
|
@ -511,8 +511,8 @@ void SrsDtls::trace(uint8_t* data, int length, bool incoming)
|
|||
handshake_type = (uint8_t)data[13];
|
||||
}
|
||||
|
||||
srs_trace("DTLS: %s length=%u, content-type=%u, size=%u, handshake-type=%u", (incoming? "RECV":"SEND"),
|
||||
length, content_type, size, handshake_type);
|
||||
srs_trace("DTLS: %s done=%u, length=%u, content-type=%u, size=%u, handshake-type=%u", (incoming? "RECV":"SEND"),
|
||||
handshake_done, length, content_type, size, handshake_type);
|
||||
}
|
||||
|
||||
const int SRTP_MASTER_KEY_KEY_LEN = 16;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue