X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fdbus-timer.c;h=abcbe6f9bed3e7308e8fa6fde29e6521d94454b7;hp=eed05e6991d5c1888bd1820b9e0fd53088398ed5;hb=8112e84f657839a056afb411249a627956518b24;hpb=34df5a34e1d0ac4bba453fb5f52f18a2f5f260f9 diff --git a/src/dbus-timer.c b/src/dbus-timer.c index eed05e699..abcbe6f9b 100644 --- a/src/dbus-timer.c +++ b/src/dbus-timer.c @@ -24,6 +24,7 @@ #include "dbus-unit.h" #include "dbus-timer.h" #include "dbus-execute.h" +#include "dbus-common.h" #define BUS_TIMER_INTERFACE \ " \n" \ @@ -42,18 +43,21 @@ BUS_INTROSPECTABLE_INTERFACE \ "\n" +#define INTERFACES_LIST \ + BUS_UNIT_INTERFACES_LIST \ + "org.freedesktop.systemd1.Timer\0" + const char bus_timer_interface[] _introspect_("Timer") = BUS_TIMER_INTERFACE; const char bus_timer_invalidating_properties[] = "Timers\0" "NextElapseUSec\0"; -static int bus_timer_append_timers(Manager *m, DBusMessageIter *i, const char *property, void *data) { +static int bus_timer_append_timers(DBusMessageIter *i, const char *property, void *data) { Timer *p = data; DBusMessageIter sub, sub2; TimerValue *k; - assert(m); assert(i); assert(property); assert(p); @@ -95,11 +99,10 @@ static int bus_timer_append_timers(Manager *m, DBusMessageIter *i, const char *p return 0; } -static int bus_timer_append_unit(Manager *m, DBusMessageIter *i, const char *property, void *data) { +static int bus_timer_append_unit(DBusMessageIter *i, const char *property, void *data) { Unit *u = data; const char *t; - assert(m); assert(i); assert(property); assert(u); @@ -118,5 +121,5 @@ DBusHandlerResult bus_timer_message_handler(Unit *u, DBusConnection *c, DBusMess { NULL, NULL, NULL, NULL, NULL } }; - return bus_default_message_handler(u->meta.manager, c, message, INTROSPECTION, properties); + return bus_default_message_handler(c, message, INTROSPECTION, INTERFACES_LIST, properties); }