jobs: Clean unneeded code
[src/app-framework-binder.git] / src / jobs.c
index d06d24c..abfe699 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016, 2017, 2018 "IoT.bzh"
+ * Copyright (C) 2016-2019 "IoT.bzh"
  * Author José Bollo <jose.bollo@iot.bzh>
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -36,7 +36,6 @@
 #include <sys/eventfd.h>
 
 #include <systemd/sd-event.h>
-#include "fdev.h"
 #if HAS_WATCHDOG
 #include <systemd/sd-daemon.h>
 #endif
@@ -71,7 +70,6 @@ struct evloop
        unsigned state;        /**< encoded state */
        int efd;               /**< event notification */
        struct sd_event *sdev; /**< the systemd event loop */
-       struct fdev *fdev;     /**< handling of events */
        struct thread *holder; /**< holder of the evloop */
 };
 
@@ -355,6 +353,9 @@ static int evloop_get()
        if (evloop.holder)
                return evloop.holder == ct;
 
+       if (!evloop.sdev)
+               return 0;
+
        ct->nholder = NULL;
        evloop.holder = ct;
        return 1;