mirror of https://github.com/irungentoo/toxcore
Fixed possible bug with TCP nonce not getting incremented.
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