summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsin <sin@2f30.org>2014-12-01 15:18:30 +0000
committersin <sin@2f30.org>2014-12-01 15:18:40 +0000
commit3fc56c719dc66f3da1d9587e58c7f3bfe6b2f305 (patch)
tree471553d4415e156bbc4537cee92134ff9a05fc4a
parent9046382217acceb141e6199fd3a35c8721dbe9fc (diff)
Do the datasave() as early as possible in shutdown()
-rw-r--r--ratox.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ratox.c b/ratox.c
index db8f06d..6138b8f 100644
--- a/ratox.c
+++ b/ratox.c
@@ -1922,6 +1922,8 @@ shutdown(void)
logmsg("Shutdown\n");
+ datasave();
+
/* Friends */
for (f = TAILQ_FIRST(&friendhead); f; f = ftmp) {
ftmp = TAILQ_NEXT(f, entry);
@@ -1959,8 +1961,6 @@ shutdown(void)
if (idfd != -1)
close(idfd);
- datasave();
-
toxav_kill(toxav);
tox_kill(tox);
}