mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Some small changes/fixes.
Changed some timeouts and made cryptopacket_handle return correctly.
This commit is contained in:
parent
602c71bc17
commit
a251e71a97
|
@ -376,8 +376,8 @@ static int cryptopacket_handle(void *object, IP_Port source, uint8_t *packet, ui
|
|||
|
||||
if (!dht->c->cryptopackethandlers[number].function) return 1;
|
||||
|
||||
dht->c->cryptopackethandlers[number].function(dht->c->cryptopackethandlers[number].object, source, public_key, data,
|
||||
len);
|
||||
return dht->c->cryptopackethandlers[number].function(dht->c->cryptopackethandlers[number].object, source, public_key,
|
||||
data, len);
|
||||
|
||||
} else { /* If request is not for us, try routing it. */
|
||||
int retval = route_packet(dht, packet + 1, packet, length);
|
||||
|
|
|
@ -806,7 +806,7 @@ int onion_set_friend_online(Onion_Client *onion_c, int friend_num, uint8_t is_on
|
|||
}
|
||||
|
||||
|
||||
#define ANNOUNCE_FRIEND 30
|
||||
#define ANNOUNCE_FRIEND ONION_NODE_PING_INTERVAL
|
||||
|
||||
static void do_friend(Onion_Client *onion_c, uint16_t friendnum)
|
||||
{
|
||||
|
@ -882,7 +882,7 @@ void oniondata_registerhandler(Onion_Client *onion_c, uint8_t byte, oniondata_ha
|
|||
}
|
||||
|
||||
#define ANNOUNCE_INTERVAL_NOT_ANNOUNCED 7
|
||||
#define ANNOUNCE_INTERVAL_ANNOUNCED 30
|
||||
#define ANNOUNCE_INTERVAL_ANNOUNCED ONION_NODE_PING_INTERVAL
|
||||
|
||||
static void do_announce(Onion_Client *onion_c)
|
||||
{
|
||||
|
|
|
@ -27,7 +27,8 @@
|
|||
#include "onion_announce.h"
|
||||
|
||||
#define MAX_ONION_CLIENTS 8
|
||||
#define ONION_NODE_TIMEOUT 240
|
||||
#define ONION_NODE_PING_INTERVAL 30
|
||||
#define ONION_NODE_TIMEOUT (ONION_NODE_PING_INTERVAL * 4)
|
||||
|
||||
/* The interval in seconds at which to tell our friends where we are */
|
||||
#define ONION_FAKEID_INTERVAL 30
|
||||
|
|
Loading…
Reference in New Issue
Block a user