summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--toxcore/crypto_core.h2
-rw-r--r--toxcore/onion_client.c6
-rw-r--r--toxcore/onion_client.h2
3 files changed, 5 insertions, 5 deletions
diff --git a/toxcore/crypto_core.h b/toxcore/crypto_core.h
index afd2f7b8..decc7fb9 100644
--- a/toxcore/crypto_core.h
+++ b/toxcore/crypto_core.h
@@ -122,7 +122,7 @@ void new_nonce(uint8_t *nonce);
122 122
123#define CRYPTO_PACKET_FRIEND_REQ 32 /* Friend request crypto packet ID. */ 123#define CRYPTO_PACKET_FRIEND_REQ 32 /* Friend request crypto packet ID. */
124#define CRYPTO_PACKET_HARDENING 48 /* Hardening crypto packet ID. */ 124#define CRYPTO_PACKET_HARDENING 48 /* Hardening crypto packet ID. */
125#define CRYPTO_PACKET_FAKEID 156 125#define CRYPTO_PACKET_DHTPK 156
126#define CRYPTO_PACKET_NAT_PING 254 /* NAT ping crypto packet ID. */ 126#define CRYPTO_PACKET_NAT_PING 254 /* NAT ping crypto packet ID. */
127 127
128/* Create a request to peer. 128/* Create a request to peer.
diff --git a/toxcore/onion_client.c b/toxcore/onion_client.c
index 61034167..3643cb2f 100644
--- a/toxcore/onion_client.c
+++ b/toxcore/onion_client.c
@@ -858,7 +858,7 @@ static int send_dht_dhtpk(const Onion_Client *onion_c, int friend_num, const uin
858 858
859 uint8_t packet[MAX_CRYPTO_REQUEST_SIZE]; 859 uint8_t packet[MAX_CRYPTO_REQUEST_SIZE];
860 len = create_request(onion_c->dht->self_public_key, onion_c->dht->self_secret_key, packet, 860 len = create_request(onion_c->dht->self_public_key, onion_c->dht->self_secret_key, packet,
861 onion_c->friends_list[friend_num].dht_public_key, temp, sizeof(temp), CRYPTO_PACKET_FAKEID); 861 onion_c->friends_list[friend_num].dht_public_key, temp, sizeof(temp), CRYPTO_PACKET_DHTPK);
862 862
863 if (len == -1) 863 if (len == -1)
864 return -1; 864 return -1;
@@ -1396,7 +1396,7 @@ Onion_Client *new_onion_client(Net_Crypto *c)
1396 networking_registerhandler(onion_c->net, NET_PACKET_ANNOUNCE_RESPONSE, &handle_announce_response, onion_c); 1396 networking_registerhandler(onion_c->net, NET_PACKET_ANNOUNCE_RESPONSE, &handle_announce_response, onion_c);
1397 networking_registerhandler(onion_c->net, NET_PACKET_ONION_DATA_RESPONSE, &handle_data_response, onion_c); 1397 networking_registerhandler(onion_c->net, NET_PACKET_ONION_DATA_RESPONSE, &handle_data_response, onion_c);
1398 oniondata_registerhandler(onion_c, ONION_DATA_DHTPK, &handle_dhtpk_announce, onion_c); 1398 oniondata_registerhandler(onion_c, ONION_DATA_DHTPK, &handle_dhtpk_announce, onion_c);
1399 cryptopacket_registerhandler(onion_c->dht, CRYPTO_PACKET_FAKEID, &handle_dht_dhtpk, onion_c); 1399 cryptopacket_registerhandler(onion_c->dht, CRYPTO_PACKET_DHTPK, &handle_dht_dhtpk, onion_c);
1400 tcp_onion_response_handler(onion_c->c, &handle_tcp_onion, onion_c); 1400 tcp_onion_response_handler(onion_c->c, &handle_tcp_onion, onion_c);
1401 1401
1402 return onion_c; 1402 return onion_c;
@@ -1412,7 +1412,7 @@ void kill_onion_client(Onion_Client *onion_c)
1412 networking_registerhandler(onion_c->net, NET_PACKET_ANNOUNCE_RESPONSE, NULL, NULL); 1412 networking_registerhandler(onion_c->net, NET_PACKET_ANNOUNCE_RESPONSE, NULL, NULL);
1413 networking_registerhandler(onion_c->net, NET_PACKET_ONION_DATA_RESPONSE, NULL, NULL); 1413 networking_registerhandler(onion_c->net, NET_PACKET_ONION_DATA_RESPONSE, NULL, NULL);
1414 oniondata_registerhandler(onion_c, ONION_DATA_DHTPK, NULL, NULL); 1414 oniondata_registerhandler(onion_c, ONION_DATA_DHTPK, NULL, NULL);
1415 cryptopacket_registerhandler(onion_c->dht, CRYPTO_PACKET_FAKEID, NULL, NULL); 1415 cryptopacket_registerhandler(onion_c->dht, CRYPTO_PACKET_DHTPK, NULL, NULL);
1416 tcp_onion_response_handler(onion_c->c, NULL, NULL); 1416 tcp_onion_response_handler(onion_c->c, NULL, NULL);
1417 memset(onion_c, 0, sizeof(Onion_Client)); 1417 memset(onion_c, 0, sizeof(Onion_Client));
1418 free(onion_c); 1418 free(onion_c);
diff --git a/toxcore/onion_client.h b/toxcore/onion_client.h
index b4e7a1b7..6851d929 100644
--- a/toxcore/onion_client.h
+++ b/toxcore/onion_client.h
@@ -57,7 +57,7 @@
57 57
58/* Onion data packet ids. */ 58/* Onion data packet ids. */
59#define ONION_DATA_FRIEND_REQ CRYPTO_PACKET_FRIEND_REQ 59#define ONION_DATA_FRIEND_REQ CRYPTO_PACKET_FRIEND_REQ
60#define ONION_DATA_DHTPK CRYPTO_PACKET_FAKEID 60#define ONION_DATA_DHTPK CRYPTO_PACKET_DHTPK
61 61
62typedef struct { 62typedef struct {
63 uint8_t public_key[crypto_box_PUBLICKEYBYTES]; 63 uint8_t public_key[crypto_box_PUBLICKEYBYTES];