mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Fixed possible bug with TCP nonce not getting incremented.
This commit is contained in:
parent
1e69af8cff
commit
bcfb1261ac
|
@ -231,10 +231,10 @@ static int write_packet_TCP_secure_connection(TCP_Client_Connection *con, const
|
|||
|
||||
if (len <= 0) {
|
||||
len = 0;
|
||||
} else {
|
||||
increment_nonce(con->sent_nonce);
|
||||
}
|
||||
|
||||
increment_nonce(con->sent_nonce);
|
||||
|
||||
if (len == sizeof(packet)) {
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -411,10 +411,10 @@ static int write_packet_TCP_secure_connection(TCP_Secure_Connection *con, const
|
|||
|
||||
if (len <= 0) {
|
||||
len = 0;
|
||||
} else {
|
||||
increment_nonce(con->sent_nonce);
|
||||
}
|
||||
|
||||
increment_nonce(con->sent_nonce);
|
||||
|
||||
if (len == sizeof(packet)) {
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user