#include <signal.h>
#include <syslog.h>
+#include <systemd/sd-event.h>
+
#include "afb-config.h"
#include "afb-hswitch.h"
#include "afb-apis.h"
#include "afb-api-so.h"
#include "afb-hsrv.h"
+#include "afb-context.h"
#include "afb-hreq.h"
#include "session.h"
#include "verbose.h"
-#include "utils-upoll.h"
+#include "afb-common.h"
#include "afb-plugin.h"
int main(int argc, char *argv[]) {
struct afb_hsrv *hsrv;
struct afb_config *config;
+ struct sd_event *eventloop;
// open syslog if ever needed
openlog("afb-daemon", 0, LOG_DAEMON);
}
// infinite loop
+ eventloop = afb_common_get_event_loop();
for(;;)
- upoll_wait(30000);
+ sd_event_run(eventloop, 30000000);
if (verbosity)
fprintf (stderr, "hoops returned from infinite loop [report bug]\n");