From c59975dd7ecdabe864f341b699f986e5e474acb6 Mon Sep 17 00:00:00 2001 From: irungentoo Date: Tue, 3 Sep 2013 08:53:07 -0400 Subject: Work in progress group chats. Not done yet. --- toxcore/DHT.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'toxcore/DHT.c') diff --git a/toxcore/DHT.c b/toxcore/DHT.c index 749eb78c..4807c369 100644 --- a/toxcore/DHT.c +++ b/toxcore/DHT.c @@ -483,12 +483,12 @@ static int getnodes(DHT *dht, IP_Port ip_port, uint8_t *public_key, uint8_t *cli { /* Check if packet is going to be sent to ourself. */ if (id_equal(public_key, dht->c->self_public_key) || is_gettingnodes(dht, ip_port, 0)) - return 1; + return -1; uint64_t ping_id = add_gettingnodes(dht, ip_port); if (ping_id == 0) - return 1; + return -1; uint8_t data[1 + CLIENT_ID_SIZE + crypto_box_NONCEBYTES + sizeof(ping_id) + CLIENT_ID_SIZE + ENCRYPTION_PADDING]; uint8_t plain[sizeof(ping_id) + CLIENT_ID_SIZE]; @@ -522,7 +522,7 @@ static int sendnodes(DHT *dht, IP_Port ip_port, uint8_t *public_key, uint8_t *cl { /* Check if packet is going to be sent to ourself. */ if (id_equal(public_key, dht->c->self_public_key)) - return 1; + return -1; uint8_t data[1 + CLIENT_ID_SIZE + crypto_box_NONCEBYTES + sizeof(ping_id) + sizeof(Node_format) * MAX_SENT_NODES + ENCRYPTION_PADDING]; -- cgit v1.2.3