Skip to content

Commit

Permalink
net_crypto now works again on pure UDP.
Browse files Browse the repository at this point in the history
  • Loading branch information
irungentoo committed May 17, 2014
1 parent 60ed415 commit b5f84b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions toxcore/net_crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -414,8 +414,8 @@ static int send_packet_to(Net_Crypto *c, int crypt_connection_id, uint8_t *data,
if (direct_connected && (uint32_t)sendpacket(c->dht->net, conn->ip_port, data, length) == length)
return 0;

if (length < 96
|| data[0] == NET_PACKET_CRYPTO_HS) //TODO: a better way of sending packets directly to confirm the others ip.
//TODO: a better way of sending packets directly to confirm the others ip.
if (length < 96 || data[0] == NET_PACKET_COOKIE_REQUEST || data[0] == NET_PACKET_CRYPTO_HS)
sendpacket(c->dht->net, conn->ip_port, data, length);

}
Expand Down

0 comments on commit b5f84b3

Please sign in to comment.