From 19befb2d5fc087f96e40ddc432b2cc9385666209 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 15 May 2014 01:15:30 +0200 Subject: sd-bus: introduce sd_bus_slot objects encapsulating callbacks or vtables attached to a bus connection This makes callback behaviour more like sd-event or sd-resolve, and creates proper object for unregistering callbacks. Taking the refernce to the slot is optional. If not taken life time of the slot will be bound to the underlying bus object (or in the case of an async call until the reply has been recieved). --- src/hostname/hostnamed.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/hostname') diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c index 2be6dcde7..48cbbdb04 100644 --- a/src/hostname/hostnamed.c +++ b/src/hostname/hostnamed.c @@ -591,7 +591,7 @@ static int connect_bus(Context *c, sd_event *event, sd_bus **_bus) { return r; } - r = sd_bus_add_object_vtable(bus, "/org/freedesktop/hostname1", "org.freedesktop.hostname1", hostname_vtable, c); + r = sd_bus_add_object_vtable(bus, NULL, "/org/freedesktop/hostname1", "org.freedesktop.hostname1", hostname_vtable, c); if (r < 0) { log_error("Failed to register object: %s", strerror(-r)); return r; -- cgit v1.2.3