Skip to content

Commit e6285bf

Browse files
author
Andrew Cady
committed
also write tox_save in client mode (with -C)
1 parent 3196377 commit e6285bf

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

main.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1524,6 +1524,11 @@ int main(int argc, char *argv[])
15241524

15251525
do_bootstrap(tox);
15261526

1527+
if((!client_mode) || load_saved_toxid_in_client_mode)
1528+
{
1529+
write_save(tox);
1530+
}
1531+
15271532
if(client_mode)
15281533
{
15291534
uint8_t dht_key[TOX_PUBLIC_KEY_SIZE];
@@ -1550,8 +1555,6 @@ int main(int argc, char *argv[])
15501555
uint8_t dht_key[TOX_PUBLIC_KEY_SIZE];
15511556
char_t readable_dht_key[2 * TOX_PUBLIC_KEY_SIZE + 1];
15521557

1553-
write_save(tox);
1554-
15551558
if(!use_shared_secret)
15561559
{
15571560
log_printf(L_WARNING, "Shared secret authentication is not used - skilled attackers may connect to your tuntox server");

0 commit comments

Comments
 (0)