mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Merge branch 'Jeffail-master'
This commit is contained in:
commit
802236272f
832
core/DHT.c
832
core/DHT.c
File diff suppressed because it is too large
Load Diff
|
@ -31,7 +31,7 @@ extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Current time, unix format */
|
/* Current time, unix format */
|
||||||
#define unix_time() ((int64_t)time(NULL))
|
#define unix_time() ((uint64_t)time(NULL))
|
||||||
|
|
||||||
/* size of the client_id in bytes */
|
/* size of the client_id in bytes */
|
||||||
#define CLIENT_ID_SIZE crypto_box_PUBLICKEYBYTES
|
#define CLIENT_ID_SIZE crypto_box_PUBLICKEYBYTES
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint8_t client_id[CLIENT_ID_SIZE];
|
uint8_t client_id[CLIENT_ID_SIZE];
|
||||||
int crypt_connection_id;
|
int crypt_connection_id;
|
||||||
int64_t friend_request_id; /* id of the friend request corresponding to the current friend request to the current friend. */
|
uint64_t friend_request_id; /* id of the friend request corresponding to the current friend request to the current friend. */
|
||||||
uint8_t status; /* 0 if no friend, 1 if added, 2 if friend request sent, 3 if confirmed friend, 4 if online. */
|
uint8_t status; /* 0 if no friend, 1 if added, 2 if friend request sent, 3 if confirmed friend, 4 if online. */
|
||||||
uint8_t info[MAX_DATA_SIZE]; /* the data that is sent during the friend requests we do */
|
uint8_t info[MAX_DATA_SIZE]; /* the data that is sent during the friend requests we do */
|
||||||
uint8_t name[MAX_NAME_LENGTH];
|
uint8_t name[MAX_NAME_LENGTH];
|
||||||
|
@ -485,7 +485,7 @@ static void doInbound()
|
||||||
/*Interval in seconds between LAN discovery packet sending*/
|
/*Interval in seconds between LAN discovery packet sending*/
|
||||||
#define LAN_DISCOVERY_INTERVAL 60
|
#define LAN_DISCOVERY_INTERVAL 60
|
||||||
|
|
||||||
static int64_t last_LANdiscovery;
|
static uint64_t last_LANdiscovery;
|
||||||
|
|
||||||
/*Send a LAN discovery packet every LAN_DISCOVERY_INTERVAL seconds*/
|
/*Send a LAN discovery packet every LAN_DISCOVERY_INTERVAL seconds*/
|
||||||
static void LANdiscovery()
|
static void LANdiscovery()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user