diff options
Diffstat (limited to 'toxcore/friend_connection.c')
-rw-r--r-- | toxcore/friend_connection.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/toxcore/friend_connection.c b/toxcore/friend_connection.c index fd5e3078..62f76b22 100644 --- a/toxcore/friend_connection.c +++ b/toxcore/friend_connection.c | |||
@@ -354,7 +354,7 @@ static void change_dht_pk(Friend_Connections *fr_c, int friendcon_id, const uint | |||
354 | friend_con->dht_pk_lastrecv = unix_time(); | 354 | friend_con->dht_pk_lastrecv = unix_time(); |
355 | 355 | ||
356 | if (friend_con->dht_lock) { | 356 | if (friend_con->dht_lock) { |
357 | if (DHT_delfriend(fr_c->dht, friend_con->dht_temp_pk, friend_con->dht_lock) != 0) { | 357 | if (dht_delfriend(fr_c->dht, friend_con->dht_temp_pk, friend_con->dht_lock) != 0) { |
358 | printf("a. Could not delete dht peer. Please report this.\n"); | 358 | printf("a. Could not delete dht peer. Please report this.\n"); |
359 | return; | 359 | return; |
360 | } | 360 | } |
@@ -362,7 +362,7 @@ static void change_dht_pk(Friend_Connections *fr_c, int friendcon_id, const uint | |||
362 | friend_con->dht_lock = 0; | 362 | friend_con->dht_lock = 0; |
363 | } | 363 | } |
364 | 364 | ||
365 | DHT_addfriend(fr_c->dht, dht_public_key, dht_ip_callback, fr_c, friendcon_id, &friend_con->dht_lock); | 365 | dht_addfriend(fr_c->dht, dht_public_key, dht_ip_callback, fr_c, friendcon_id, &friend_con->dht_lock); |
366 | memcpy(friend_con->dht_temp_pk, dht_public_key, CRYPTO_PUBLIC_KEY_SIZE); | 366 | memcpy(friend_con->dht_temp_pk, dht_public_key, CRYPTO_PUBLIC_KEY_SIZE); |
367 | } | 367 | } |
368 | 368 | ||
@@ -789,7 +789,7 @@ int kill_friend_connection(Friend_Connections *fr_c, int friendcon_id) | |||
789 | crypto_kill(fr_c->net_crypto, friend_con->crypt_connection_id); | 789 | crypto_kill(fr_c->net_crypto, friend_con->crypt_connection_id); |
790 | 790 | ||
791 | if (friend_con->dht_lock) { | 791 | if (friend_con->dht_lock) { |
792 | DHT_delfriend(fr_c->dht, friend_con->dht_temp_pk, friend_con->dht_lock); | 792 | dht_delfriend(fr_c->dht, friend_con->dht_temp_pk, friend_con->dht_lock); |
793 | } | 793 | } |
794 | 794 | ||
795 | return wipe_friend_conn(fr_c, friendcon_id); | 795 | return wipe_friend_conn(fr_c, friendcon_id); |
@@ -909,7 +909,7 @@ void do_friend_connections(Friend_Connections *fr_c, void *userdata) | |||
909 | if (friend_con->status == FRIENDCONN_STATUS_CONNECTING) { | 909 | if (friend_con->status == FRIENDCONN_STATUS_CONNECTING) { |
910 | if (friend_con->dht_pk_lastrecv + FRIEND_DHT_TIMEOUT < temp_time) { | 910 | if (friend_con->dht_pk_lastrecv + FRIEND_DHT_TIMEOUT < temp_time) { |
911 | if (friend_con->dht_lock) { | 911 | if (friend_con->dht_lock) { |
912 | DHT_delfriend(fr_c->dht, friend_con->dht_temp_pk, friend_con->dht_lock); | 912 | dht_delfriend(fr_c->dht, friend_con->dht_temp_pk, friend_con->dht_lock); |
913 | friend_con->dht_lock = 0; | 913 | friend_con->dht_lock = 0; |
914 | memset(friend_con->dht_temp_pk, 0, CRYPTO_PUBLIC_KEY_SIZE); | 914 | memset(friend_con->dht_temp_pk, 0, CRYPTO_PUBLIC_KEY_SIZE); |
915 | } | 915 | } |