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).
This commit is contained in:
@@ -684,7 +684,7 @@ static int link_set_hostname(Link *link, const char *hostname) {
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
r = sd_bus_call_async(link->manager->bus, m, set_hostname_handler, link, 0, NULL);
|
||||
r = sd_bus_call_async(link->manager->bus, NULL, m, set_hostname_handler, link, 0);
|
||||
if (r < 0)
|
||||
log_error_link(link, "Could not set transient hostname: %s", strerror(-r));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user