summaryrefslogtreecommitdiff
path: root/toxcore/TCP_connection.c
diff options
context:
space:
mode:
Diffstat (limited to 'toxcore/TCP_connection.c')
-rw-r--r--toxcore/TCP_connection.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/toxcore/TCP_connection.c b/toxcore/TCP_connection.c
index 5f38b5dd..027779dd 100644
--- a/toxcore/TCP_connection.c
+++ b/toxcore/TCP_connection.c
@@ -384,7 +384,7 @@ static int find_tcp_connection_to(TCP_Connections *tcp_c, const uint8_t *public_
384 TCP_Connection_to *con_to = get_connection(tcp_c, i); 384 TCP_Connection_to *con_to = get_connection(tcp_c, i);
385 385
386 if (con_to) { 386 if (con_to) {
387 if (memcmp(con_to->public_key, public_key, crypto_box_PUBLICKEYBYTES) == 0) { 387 if (public_key_cmp(con_to->public_key, public_key) == 0) {
388 return i; 388 return i;
389 } 389 }
390 } 390 }
@@ -407,11 +407,11 @@ static int find_tcp_connection_relay(TCP_Connections *tcp_c, const uint8_t *rela
407 407
408 if (tcp_con) { 408 if (tcp_con) {
409 if (tcp_con->status == TCP_CONN_SLEEPING) { 409 if (tcp_con->status == TCP_CONN_SLEEPING) {
410 if (memcmp(tcp_con->relay_pk, relay_pk, crypto_box_PUBLICKEYBYTES) == 0) { 410 if (public_key_cmp(tcp_con->relay_pk, relay_pk) == 0) {
411 return i; 411 return i;
412 } 412 }
413 } else { 413 } else {
414 if (memcmp(tcp_con->connection->public_key, relay_pk, crypto_box_PUBLICKEYBYTES) == 0) { 414 if (public_key_cmp(tcp_con->connection->public_key, relay_pk) == 0) {
415 return i; 415 return i;
416 } 416 }
417 } 417 }