chiark / gitweb /
Fiddle with CSS+HTML in effort to get more consistent buttons
[disorder] / server / schedule.c
index c2cdb6d4ce352ebd403347cc18f82626db25662c..6092fb5b227e9dc95b896ae268befc1ea989e387 100644 (file)
  *
  * TODO: add disorder-dump support
  */
-
-#include <config.h>
-#include "types.h"
-
-#include <string.h>
-#include <db.h>
-#include <time.h>
-#include <stddef.h>
-
-#include "trackdb.h"
-#include "trackdb-int.h"
-#include "schedule.h"
-#include "table.h"
-#include "kvp.h"
-#include "log.h"
-#include "queue.h"
-#include "server-queue.h"
-#include "state.h"
-#include "play.h"
-#include "mem.h"
-#include "random.h"
-#include "vector.h"
+#include "disorder-server.h"
 
 static int schedule_trigger(ev_source *ev,
                            const struct timeval *now,
@@ -208,6 +187,7 @@ static int schedule_init_tid(ev_source *ev,
       if(priority && !strcmp(priority, "junk")) {
         /* Junk actions that are in the past are discarded during startup */
        /* TODO recurring events should be handled differently here */
+        info("junk event %s is in the past, discarding", id);
        if(cdel(cursor))
          goto deadlocked;
         /* Skip this time */
@@ -453,7 +433,7 @@ static int schedule_lookup(const char *id,
   int n;
 
   /* Look up the action */
-  n = TABLE_FIND(schedule_actions, typeof(schedule_actions[0]), name, action);
+  n = TABLE_FIND(schedule_actions, name, action);
   if(n < 0) {
     error(0, "scheduled event %s: unrecognized action '%s'", id, action);
     return -1;