summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2020-08-19 01:29:45 -0400
committerAndrew Cady <d@jerkface.net>2020-08-19 01:29:45 -0400
commite6285bfc07cc2453dc3c6e532c191bcac30ff1f6 (patch)
treec8d81cc1488c6ead28ddea74881299611d54444e
parent3196377fe33d6a23f22fb47ed4f2b174e370d086 (diff)
also write tox_save in client mode (with -C)
-rw-r--r--main.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/main.c b/main.c
index ed2020e..6554aa4 100644
--- a/main.c
+++ b/main.c
@@ -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");