Skip to content

Commit

Permalink
for #418, when simple handshake, copy s1 to c2.
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Dec 22, 2015
1 parent c785057 commit 8d378cd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions trunk/src/protocol/srs_rtmp_handshake.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1164,6 +1164,11 @@ int SrsSimpleHandshake::handshake_with_server(SrsHandshakeBytes* hs_bytes, ISrsP
if ((ret = hs_bytes->create_c2()) != ERROR_SUCCESS) {
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) {
srs_warn("simple handshake write c2 failed. ret=%d", ret);
return ret;
Expand Down

0 comments on commit 8d378cd

Please sign in to comment.