X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fcore%2Fdbus-timer.c;h=4082f7f9b996829a60197dcb50304d30e09fd3f9;hp=75add815196168c00da42399873dd5a4e311bf51;hb=3ecaa09bccd8a59c9f1e06756a1334a162206dc4;hpb=b719810db446244ff708a2f5f08566af67ddab61 diff --git a/src/core/dbus-timer.c b/src/core/dbus-timer.c index 75add8151..4082f7f9b 100644 --- a/src/core/dbus-timer.c +++ b/src/core/dbus-timer.c @@ -152,15 +152,15 @@ static int bus_timer_append_calendar_timers(DBusMessageIter *i, const char *prop } static int bus_timer_append_unit(DBusMessageIter *i, const char *property, void *data) { - Unit *u = data; - Timer *timer = TIMER(u); + Unit *u = data, *trigger; const char *t; assert(i); assert(property); assert(u); - t = UNIT_DEREF(timer->unit) ? UNIT_DEREF(timer->unit)->id : ""; + trigger = UNIT_TRIGGER(u); + t = trigger ? trigger->id : ""; return dbus_message_iter_append_basic(i, DBUS_TYPE_STRING, &t) ? 0 : -ENOMEM; }