diff options
-rw-r--r-- | main.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -1524,6 +1524,11 @@ int main(int argc, char *argv[]) | |||
1524 | 1524 | ||
1525 | do_bootstrap(tox); | 1525 | do_bootstrap(tox); |
1526 | 1526 | ||
1527 | if((!client_mode) || load_saved_toxid_in_client_mode) | ||
1528 | { | ||
1529 | write_save(tox); | ||
1530 | } | ||
1531 | |||
1527 | if(client_mode) | 1532 | if(client_mode) |
1528 | { | 1533 | { |
1529 | uint8_t dht_key[TOX_PUBLIC_KEY_SIZE]; | 1534 | uint8_t dht_key[TOX_PUBLIC_KEY_SIZE]; |
@@ -1550,8 +1555,6 @@ int main(int argc, char *argv[]) | |||
1550 | uint8_t dht_key[TOX_PUBLIC_KEY_SIZE]; | 1555 | uint8_t dht_key[TOX_PUBLIC_KEY_SIZE]; |
1551 | char_t readable_dht_key[2 * TOX_PUBLIC_KEY_SIZE + 1]; | 1556 | char_t readable_dht_key[2 * TOX_PUBLIC_KEY_SIZE + 1]; |
1552 | 1557 | ||
1553 | write_save(tox); | ||
1554 | |||
1555 | if(!use_shared_secret) | 1558 | if(!use_shared_secret) |
1556 | { | 1559 | { |
1557 | log_printf(L_WARNING, "Shared secret authentication is not used - skilled attackers may connect to your tuntox server"); | 1560 | log_printf(L_WARNING, "Shared secret authentication is not used - skilled attackers may connect to your tuntox server"); |