summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-bus/busctl.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-05-15 01:15:30 +0200
committerLennart Poettering <lennart@poettering.net>2014-05-15 01:15:30 +0200
commit19befb2d5fc087f96e40ddc432b2cc9385666209 (patch)
tree4a28a54ed25ba8fb57578f639b2691749c9c935e /src/libsystemd/sd-bus/busctl.c
parent9a78148e40402b44f361f4fbf63bb97a21aeac0b (diff)
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).
Diffstat (limited to 'src/libsystemd/sd-bus/busctl.c')
-rw-r--r--src/libsystemd/sd-bus/busctl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsystemd/sd-bus/busctl.c b/src/libsystemd/sd-bus/busctl.c
index 4e396f20c1..4545047011 100644
--- a/src/libsystemd/sd-bus/busctl.c
+++ b/src/libsystemd/sd-bus/busctl.c
@@ -240,7 +240,7 @@ static int monitor(sd_bus *bus, char *argv[]) {
if (!m)
return log_oom();
- r = sd_bus_add_match(bus, m, NULL, NULL);
+ r = sd_bus_add_match(bus, NULL, m, NULL, NULL);
if (r < 0) {
log_error("Failed to add match: %s", strerror(-r));
return r;
@@ -250,7 +250,7 @@ static int monitor(sd_bus *bus, char *argv[]) {
}
STRV_FOREACH(i, arg_matches) {
- r = sd_bus_add_match(bus, *i, NULL, NULL);
+ r = sd_bus_add_match(bus, NULL, *i, NULL, NULL);
if (r < 0) {
log_error("Failed to add match: %s", strerror(-r));
return r;
@@ -260,7 +260,7 @@ static int monitor(sd_bus *bus, char *argv[]) {
}
if (!added_something) {
- r = sd_bus_add_match(bus, "", NULL, NULL);
+ r = sd_bus_add_match(bus, NULL, "", NULL, NULL);
if (r < 0) {
log_error("Failed to add match: %s", strerror(-r));
return r;