mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Fixed possible bug.
This commit is contained in:
parent
07b4b041fb
commit
dedf86311b
|
@ -1704,6 +1704,7 @@ int accept_crypto_connection(Net_Crypto *c, New_Connection *n_c)
|
|||
|
||||
memcpy(conn->dht_public_key, n_c->dht_public_key, crypto_box_PUBLICKEYBYTES);
|
||||
conn->packet_send_rate = CRYPTO_PACKET_MIN_RATE;
|
||||
conn->packet_send_rate_requested = CRYPTO_PACKET_MIN_RATE;
|
||||
conn->packets_left = CRYPTO_MIN_QUEUE_LENGTH;
|
||||
conn->rtt_time = DEFAULT_PING_CONNECTION;
|
||||
crypto_connection_add_source(c, crypt_connection_id, n_c->source);
|
||||
|
@ -1746,6 +1747,7 @@ int new_crypto_connection(Net_Crypto *c, const uint8_t *real_public_key, const u
|
|||
crypto_box_keypair(conn->sessionpublic_key, conn->sessionsecret_key);
|
||||
conn->status = CRYPTO_CONN_COOKIE_REQUESTING;
|
||||
conn->packet_send_rate = CRYPTO_PACKET_MIN_RATE;
|
||||
conn->packet_send_rate_requested = CRYPTO_PACKET_MIN_RATE;
|
||||
conn->packets_left = CRYPTO_MIN_QUEUE_LENGTH;
|
||||
conn->rtt_time = DEFAULT_PING_CONNECTION;
|
||||
memcpy(conn->dht_public_key, dht_public_key, crypto_box_PUBLICKEYBYTES);
|
||||
|
|
Loading…
Reference in New Issue
Block a user