mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
for #418, when simple handshake, copy s1 to c2.
This commit is contained in:
parent
c7850570c1
commit
8d378cda2e
1 changed files with 5 additions and 0 deletions
|
@ -1164,6 +1164,11 @@ int SrsSimpleHandshake::handshake_with_server(SrsHandshakeBytes* hs_bytes, ISrsP
|
||||||
if ((ret = hs_bytes->create_c2()) != ERROR_SUCCESS) {
|
if ((ret = hs_bytes->create_c2()) != ERROR_SUCCESS) {
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// for simple handshake, copy s1 to c2.
|
||||||
|
// @see https://github.com/ossrs/srs/issues/418
|
||||||
|
memcpy(hs_bytes->c2, hs_bytes->s0s1s2 + 1, 1536);
|
||||||
|
|
||||||
if ((ret = io->write(hs_bytes->c2, 1536, &nsize)) != ERROR_SUCCESS) {
|
if ((ret = io->write(hs_bytes->c2, 1536, &nsize)) != ERROR_SUCCESS) {
|
||||||
srs_warn("simple handshake write c2 failed. ret=%d", ret);
|
srs_warn("simple handshake write c2 failed. ret=%d", ret);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue