chiark / gitweb /
exercise the C client a bit from tests
[disorder] / server / state.c
index 455cf41f09403e73cf92da3d778538843b7e4a0f..66760f0963f1353a9db68162763c3eb48462b441 100644 (file)
@@ -41,6 +41,7 @@
 #include "configuration.h"
 #include "log.h"
 #include "queue.h"
+#include "server-queue.h"
 #include "server.h"
 #include "printf.h"
 #include "addr.h"
@@ -143,15 +144,17 @@ int reconfigure(ev_source *ev, int reload) {
   if(reload) {
     need_another_rescan = trackdb_rescan_cancel();
     trackdb_close();
-    if(config_read())
+    if(config_read(1))
       ret = -1;
     else {
       /* Tell the speaker it needs to reload its config too. */
       speaker_reload();
       info("%s: installed new configuration", configfile);
     }
-  }
-  trackdb_open();
+    trackdb_open(TRACKDB_NO_UPGRADE);
+  } else
+    /* We only allow for upgrade at startup */
+    trackdb_open(TRACKDB_CAN_UPGRADE);
   if(need_another_rescan)
     trackdb_rescan(ev);
   if(!ret) {