X-Git-Url: https://git.distorted.org.uk/~mdw/disorder/blobdiff_plain/5aff007d8fcfb4c6cc3c3627ae15f45562db7a0d..6acdbba4d904b8ee764f0d564675357a46d43fa8:/server/state.c?ds=sidebyside diff --git a/server/state.c b/server/state.c index e952556..2be2edd 100644 --- a/server/state.c +++ b/server/state.c @@ -18,34 +18,7 @@ * USA */ -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "event.h" -#include "play.h" -#include "rights.h" -#include "trackdb.h" -#include "state.h" -#include "configuration.h" -#include "log.h" -#include "queue.h" -#include "server-queue.h" -#include "server.h" -#include "printf.h" -#include "addr.h" +#include "disorder-server.h" static const char *current_unix; static int current_unix_fd; @@ -69,14 +42,10 @@ static void reset_socket(ev_source *ev) { char *name; static const struct addrinfo pref = { - AI_PASSIVE, - PF_INET, - SOCK_STREAM, - IPPROTO_TCP, - 0, - 0, - 0, - 0 + .ai_flags = AI_PASSIVE, + .ai_family = PF_INET, + .ai_socktype = SOCK_STREAM, + .ai_protocol = IPPROTO_TCP, }; /* unix first */ @@ -158,7 +127,9 @@ int reconfigure(ev_source *ev, int reload) { /* We only allow for upgrade at startup */ trackdb_open(TRACKDB_CAN_UPGRADE); if(need_another_rescan) - trackdb_rescan(ev, 1/*check*/); + trackdb_rescan(ev, 1/*check*/, 0, 0); + /* Arrange timeouts for schedule actions */ + schedule_init(ev); if(!ret) { queue_read(); recent_read();