Optimaztion code for srt (#3934)

This commit is contained in:
xiongguangjie
2024-09-28 10:11:39 +08:00
committed by GitHub
parent de7afaf992
commit 87277ac91a
2 changed files with 7 additions and 7 deletions

View File

@@ -206,7 +206,7 @@ void SrtTransport::handleHandshakeInduction(HandshakePacket &pkt, struct sockadd
res->srt_socket_id = _peer_socket_id;
res->syn_cookie = HandshakePacket::generateSynCookie(addr, _start_timestamp);
_sync_cookie = res->syn_cookie;
memcpy(res->peer_ip_addr, pkt.peer_ip_addr, sizeof(pkt.peer_ip_addr) * sizeof(pkt.peer_ip_addr[0]));
memcpy(res->peer_ip_addr, pkt.peer_ip_addr, sizeof(pkt.peer_ip_addr));
_handleshake_res = res;
res->storeToData();