From fd56762a1bd3af1207ecb2e7ea1e895c46ae2cc8 Mon Sep 17 00:00:00 2001 From: irungentoo Date: Sat, 14 Feb 2015 23:00:35 -0500 Subject: Code cleanups. --- toxcore/crypto_core.h | 2 +- toxcore/onion_client.c | 6 +++--- toxcore/onion_client.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'toxcore') 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); #define CRYPTO_PACKET_FRIEND_REQ 32 /* Friend request crypto packet ID. */ #define CRYPTO_PACKET_HARDENING 48 /* Hardening crypto packet ID. */ -#define CRYPTO_PACKET_FAKEID 156 +#define CRYPTO_PACKET_DHTPK 156 #define CRYPTO_PACKET_NAT_PING 254 /* NAT ping crypto packet ID. */ /* 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 uint8_t packet[MAX_CRYPTO_REQUEST_SIZE]; len = create_request(onion_c->dht->self_public_key, onion_c->dht->self_secret_key, packet, - onion_c->friends_list[friend_num].dht_public_key, temp, sizeof(temp), CRYPTO_PACKET_FAKEID); + onion_c->friends_list[friend_num].dht_public_key, temp, sizeof(temp), CRYPTO_PACKET_DHTPK); if (len == -1) return -1; @@ -1396,7 +1396,7 @@ Onion_Client *new_onion_client(Net_Crypto *c) networking_registerhandler(onion_c->net, NET_PACKET_ANNOUNCE_RESPONSE, &handle_announce_response, onion_c); networking_registerhandler(onion_c->net, NET_PACKET_ONION_DATA_RESPONSE, &handle_data_response, onion_c); oniondata_registerhandler(onion_c, ONION_DATA_DHTPK, &handle_dhtpk_announce, onion_c); - cryptopacket_registerhandler(onion_c->dht, CRYPTO_PACKET_FAKEID, &handle_dht_dhtpk, onion_c); + cryptopacket_registerhandler(onion_c->dht, CRYPTO_PACKET_DHTPK, &handle_dht_dhtpk, onion_c); tcp_onion_response_handler(onion_c->c, &handle_tcp_onion, onion_c); return onion_c; @@ -1412,7 +1412,7 @@ void kill_onion_client(Onion_Client *onion_c) networking_registerhandler(onion_c->net, NET_PACKET_ANNOUNCE_RESPONSE, NULL, NULL); networking_registerhandler(onion_c->net, NET_PACKET_ONION_DATA_RESPONSE, NULL, NULL); oniondata_registerhandler(onion_c, ONION_DATA_DHTPK, NULL, NULL); - cryptopacket_registerhandler(onion_c->dht, CRYPTO_PACKET_FAKEID, NULL, NULL); + cryptopacket_registerhandler(onion_c->dht, CRYPTO_PACKET_DHTPK, NULL, NULL); tcp_onion_response_handler(onion_c->c, NULL, NULL); memset(onion_c, 0, sizeof(Onion_Client)); 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 @@ /* Onion data packet ids. */ #define ONION_DATA_FRIEND_REQ CRYPTO_PACKET_FRIEND_REQ -#define ONION_DATA_DHTPK CRYPTO_PACKET_FAKEID +#define ONION_DATA_DHTPK CRYPTO_PACKET_DHTPK typedef struct { uint8_t public_key[crypto_box_PUBLICKEYBYTES]; -- cgit v1.2.3