summaryrefslogtreecommitdiff
path: root/toxcore/net_crypto.c
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2014-05-17 15:23:16 -0400
committerirungentoo <irungentoo@gmail.com>2014-05-17 15:23:16 -0400
commitb5f84b33f707484890357215593eeb8b1e77bdda (patch)
tree5a0539dd2c8be30ca998a2f41791906dfd5d97d0 /toxcore/net_crypto.c
parent60ed415a5a36ac253a343f403e1bbfb620ae571a (diff)
net_crypto now works again on pure UDP.
Diffstat (limited to 'toxcore/net_crypto.c')
-rw-r--r--toxcore/net_crypto.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/toxcore/net_crypto.c b/toxcore/net_crypto.c
index 8230a41d..1e3456c3 100644
--- a/toxcore/net_crypto.c
+++ b/toxcore/net_crypto.c
@@ -414,8 +414,8 @@ static int send_packet_to(Net_Crypto *c, int crypt_connection_id, uint8_t *data,
414 if (direct_connected && (uint32_t)sendpacket(c->dht->net, conn->ip_port, data, length) == length) 414 if (direct_connected && (uint32_t)sendpacket(c->dht->net, conn->ip_port, data, length) == length)
415 return 0; 415 return 0;
416 416
417 if (length < 96 417 //TODO: a better way of sending packets directly to confirm the others ip.
418 || data[0] == NET_PACKET_CRYPTO_HS) //TODO: a better way of sending packets directly to confirm the others ip. 418 if (length < 96 || data[0] == NET_PACKET_COOKIE_REQUEST || data[0] == NET_PACKET_CRYPTO_HS)
419 sendpacket(c->dht->net, conn->ip_port, data, length); 419 sendpacket(c->dht->net, conn->ip_port, data, length);
420 420
421 } 421 }