diff options
Diffstat (limited to 'toxcore/Messenger.c')
-rw-r--r-- | toxcore/Messenger.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/toxcore/Messenger.c b/toxcore/Messenger.c index e4d32b8a..a27a44dc 100644 --- a/toxcore/Messenger.c +++ b/toxcore/Messenger.c | |||
@@ -1483,7 +1483,7 @@ uint32_t Messenger_size(Messenger *m) | |||
1483 | { | 1483 | { |
1484 | uint32_t size32 = sizeof(uint32_t), sizesubhead = size32 * 2; | 1484 | uint32_t size32 = sizeof(uint32_t), sizesubhead = size32 * 2; |
1485 | return size32 * 2 // global cookie | 1485 | return size32 * 2 // global cookie |
1486 | + sizesubhead + sizeof(uint32_t) + crypto_box_PUBLICKEYBYTES + crypto_box_SECRETKEYBYTES | 1486 | + sizesubhead + sizeof(uint32_t) + crypto_box_PUBLICKEYBYTES + crypto_box_SECRETKEYBYTES |
1487 | + sizesubhead + DHT_size(m->dht) // DHT | 1487 | + sizesubhead + DHT_size(m->dht) // DHT |
1488 | + sizesubhead + sizeof(Friend) * m->numfriends // Friendlist itself. | 1488 | + sizesubhead + sizeof(Friend) * m->numfriends // Friendlist itself. |
1489 | + sizesubhead + m->name_length // Own nickname. | 1489 | + sizesubhead + m->name_length // Own nickname. |
@@ -1589,10 +1589,12 @@ static int messenger_load_state_callback(void *outer, uint8_t *data, uint32_t le | |||
1589 | } | 1589 | } |
1590 | 1590 | ||
1591 | break; | 1591 | break; |
1592 | |||
1592 | #ifdef DEBUG | 1593 | #ifdef DEBUG |
1593 | default: | 1594 | default: |
1594 | fprintf(stderr, "Load state: contains unrecognized part (len %u, type %u)\n", | 1595 | fprintf(stderr, "Load state: contains unrecognized part (len %u, type %u)\n", |
1595 | length, type); | 1596 | length, type); |
1597 | break; | ||
1596 | #endif | 1598 | #endif |
1597 | } | 1599 | } |
1598 | 1600 | ||