diff options
Diffstat (limited to 'toxcore/DHT.c')
-rw-r--r-- | toxcore/DHT.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/toxcore/DHT.c b/toxcore/DHT.c index 8208052d..4908de32 100644 --- a/toxcore/DHT.c +++ b/toxcore/DHT.c | |||
@@ -2831,7 +2831,7 @@ uint32_t dht_size(const DHT *dht) | |||
2831 | /* Save the DHT in data where data is an array of size dht_size(). */ | 2831 | /* Save the DHT in data where data is an array of size dht_size(). */ |
2832 | void dht_save(const DHT *dht, uint8_t *data) | 2832 | void dht_save(const DHT *dht, uint8_t *data) |
2833 | { | 2833 | { |
2834 | host_to_lendian32(data, DHT_STATE_COOKIE_GLOBAL); | 2834 | host_to_lendian_bytes32(data, DHT_STATE_COOKIE_GLOBAL); |
2835 | data += sizeof(uint32_t); | 2835 | data += sizeof(uint32_t); |
2836 | 2836 | ||
2837 | uint8_t *const old_data = data; | 2837 | uint8_t *const old_data = data; |
@@ -2960,7 +2960,7 @@ int dht_load(DHT *dht, const uint8_t *data, uint32_t length) | |||
2960 | 2960 | ||
2961 | if (length > cookie_len) { | 2961 | if (length > cookie_len) { |
2962 | uint32_t data32; | 2962 | uint32_t data32; |
2963 | lendian_to_host32(&data32, data); | 2963 | lendian_bytes_to_host32(&data32, data); |
2964 | 2964 | ||
2965 | if (data32 == DHT_STATE_COOKIE_GLOBAL) { | 2965 | if (data32 == DHT_STATE_COOKIE_GLOBAL) { |
2966 | return state_load(dht->log, dht_load_state_callback, dht, data + cookie_len, | 2966 | return state_load(dht->log, dht_load_state_callback, dht, data + cookie_len, |