summaryrefslogtreecommitdiff
path: root/toxcore/net_crypto.c
diff options
context:
space:
mode:
Diffstat (limited to 'toxcore/net_crypto.c')
-rw-r--r--toxcore/net_crypto.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toxcore/net_crypto.c b/toxcore/net_crypto.c
index 8163701e..3f866f74 100644
--- a/toxcore/net_crypto.c
+++ b/toxcore/net_crypto.c
@@ -451,7 +451,7 @@ int crypto_connect(Net_Crypto *c, uint8_t *public_key, IP_Port ip_port)
451 if (id != -1) { 451 if (id != -1) {
452 IP_Port c_ip = connection_ip(c->lossless_udp, c->crypto_connections[id].number); 452 IP_Port c_ip = connection_ip(c->lossless_udp, c->crypto_connections[id].number);
453 453
454 if (c_ip.ip.uint32 == ip_port.ip.uint32 && c_ip.port == ip_port.port) 454 if (ipport_equal(&c_ip, &ip_port))
455 return -1; 455 return -1;
456 } 456 }
457 457