Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
return 0;
}
-int nw_bus_connect(sd_bus* bus, sd_event* loop) {
+int nw_bus_connect(sd_bus* bus, sd_event* loop, struct nw_daemon* daemon) {
int r;
// Create a bus object
}
// Register the implementation
- r = nw_bus_register_implementation(bus, &daemon_implementation, NULL);
+ r = nw_bus_register_implementation(bus, &daemon_implementation, daemon);
if (r)
return r;
#include <systemd/sd-bus.h>
#include <systemd/sd-event.h>
-int nw_bus_connect(sd_bus* bus, sd_event* loop);
+#include "daemon.h"
+
+int nw_bus_connect(sd_bus* bus, sd_event* loop, struct nw_daemon* daemon);
struct nw_bus_implementation {
const char* path;
return r;
// Connect to the system bus
- r = nw_bus_connect(daemon->bus, daemon->loop);
+ r = nw_bus_connect(daemon->bus, daemon->loop, daemon);
if (r)
return r;