From e6285bfc07cc2453dc3c6e532c191bcac30ff1f6 Mon Sep 17 00:00:00 2001 From: Andrew Cady Date: Wed, 19 Aug 2020 01:29:45 -0400 Subject: [PATCH] also write tox_save in client mode (with -C) --- main.c | 7 +++++-- 1 file 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[]) do_bootstrap(tox); + if((!client_mode) || load_saved_toxid_in_client_mode) + { + write_save(tox); + } + if(client_mode) { uint8_t dht_key[TOX_PUBLIC_KEY_SIZE]; @@ -1550,8 +1555,6 @@ int main(int argc, char *argv[]) uint8_t dht_key[TOX_PUBLIC_KEY_SIZE]; char_t readable_dht_key[2 * TOX_PUBLIC_KEY_SIZE + 1]; - write_save(tox); - if(!use_shared_secret) { log_printf(L_WARNING, "Shared secret authentication is not used - skilled attackers may connect to your tuntox server");