summaryrefslogtreecommitdiff
path: root/toxcore/onion_client.c
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2015-04-15 20:53:21 -0400
committerirungentoo <irungentoo@gmail.com>2015-04-15 20:53:21 -0400
commit0bc37303875c9adb90bf4344279580f5df0cc86e (patch)
tree097280eeeb0d9a2a20ec1bfab41e4121703b742b /toxcore/onion_client.c
parentf8087887feaf77577a345ae1be68776459613c03 (diff)
Made net_crypto use TCP_connection.
TODO: -Reconnection. -If UDP connction is good, connect to less TCP relays. -Store some TCP relays in friend connection associated to each friend?
Diffstat (limited to 'toxcore/onion_client.c')
-rw-r--r--toxcore/onion_client.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/toxcore/onion_client.c b/toxcore/onion_client.c
index a9fc1643..8ab62da2 100644
--- a/toxcore/onion_client.c
+++ b/toxcore/onion_client.c
@@ -1467,7 +1467,7 @@ Onion_Client *new_onion_client(Net_Crypto *c)
1467 networking_registerhandler(onion_c->net, NET_PACKET_ONION_DATA_RESPONSE, &handle_data_response, onion_c); 1467 networking_registerhandler(onion_c->net, NET_PACKET_ONION_DATA_RESPONSE, &handle_data_response, onion_c);
1468 oniondata_registerhandler(onion_c, ONION_DATA_DHTPK, &handle_dhtpk_announce, onion_c); 1468 oniondata_registerhandler(onion_c, ONION_DATA_DHTPK, &handle_dhtpk_announce, onion_c);
1469 cryptopacket_registerhandler(onion_c->dht, CRYPTO_PACKET_DHTPK, &handle_dht_dhtpk, onion_c); 1469 cryptopacket_registerhandler(onion_c->dht, CRYPTO_PACKET_DHTPK, &handle_dht_dhtpk, onion_c);
1470 tcp_onion_response_handler(onion_c->c, &handle_tcp_onion, onion_c); 1470 set_onion_packet_tcp_connection_callback(onion_c->c->tcp_c, &handle_tcp_onion, onion_c);
1471 1471
1472 return onion_c; 1472 return onion_c;
1473} 1473}
@@ -1483,7 +1483,7 @@ void kill_onion_client(Onion_Client *onion_c)
1483 networking_registerhandler(onion_c->net, NET_PACKET_ONION_DATA_RESPONSE, NULL, NULL); 1483 networking_registerhandler(onion_c->net, NET_PACKET_ONION_DATA_RESPONSE, NULL, NULL);
1484 oniondata_registerhandler(onion_c, ONION_DATA_DHTPK, NULL, NULL); 1484 oniondata_registerhandler(onion_c, ONION_DATA_DHTPK, NULL, NULL);
1485 cryptopacket_registerhandler(onion_c->dht, CRYPTO_PACKET_DHTPK, NULL, NULL); 1485 cryptopacket_registerhandler(onion_c->dht, CRYPTO_PACKET_DHTPK, NULL, NULL);
1486 tcp_onion_response_handler(onion_c->c, NULL, NULL); 1486 set_onion_packet_tcp_connection_callback(onion_c->c->tcp_c, NULL, NULL);
1487 memset(onion_c, 0, sizeof(Onion_Client)); 1487 memset(onion_c, 0, sizeof(Onion_Client));
1488 free(onion_c); 1488 free(onion_c);
1489} 1489}