Write the hash cache back to disk whenever it is dirty when the daemon exits.
authorFredrik Tolf <fredrik@dolda2000.com>
Sat, 15 Mar 2008 13:45:37 +0000 (14:45 +0100)
committerFredrik Tolf <fredrik@dolda2000.com>
Sat, 15 Mar 2008 13:45:37 +0000 (14:45 +0100)
daemon/client.c

index 26b50f3..46766e9 100644 (file)
@@ -1086,6 +1086,8 @@ static void terminate(void)
 {
     if(hashjob != 0)
        kill(hashjob, SIGHUP);
+    if(hashwritetimer != NULL)
+       writehashcache(1);
     while(shares != NULL)
        freesharepoint(shares);
     freecache(shareroot);