diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-04-29 18:35:10 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-04-29 18:36:25 +0200 |
commit | 190700621f95160d364f8ec1d3e360246c41ce75 (patch) | |
tree | 783c3b43bd6fd93892fada76f5c20112a4e73d7c /src/libsystemd/sd-bus/test-bus-objects.c | |
parent | b53c3c2d24ed1398ee427139cd880b07bc35fa24 (diff) |
sd-bus: drop bus parameter from message callback prototype
This should simplify the prototype a bit. The bus parameter is redundant
in most cases, and in the few where it matters it can be derived from
the message via sd_bus_message_get_bus().
Diffstat (limited to 'src/libsystemd/sd-bus/test-bus-objects.c')
-rw-r--r-- | src/libsystemd/sd-bus/test-bus-objects.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/libsystemd/sd-bus/test-bus-objects.c b/src/libsystemd/sd-bus/test-bus-objects.c index 895eda4eaa..52952603e4 100644 --- a/src/libsystemd/sd-bus/test-bus-objects.c +++ b/src/libsystemd/sd-bus/test-bus-objects.c @@ -41,7 +41,7 @@ struct context { uint32_t automatic_integer_property; }; -static int something_handler(sd_bus *bus, sd_bus_message *m, void *userdata, sd_bus_error *error) { +static int something_handler(sd_bus_message *m, void *userdata, sd_bus_error *error) { struct context *c = userdata; const char *s; char *n = NULL; @@ -67,7 +67,7 @@ static int something_handler(sd_bus *bus, sd_bus_message *m, void *userdata, sd_ return 1; } -static int exit_handler(sd_bus *bus, sd_bus_message *m, void *userdata, sd_bus_error *error) { +static int exit_handler(sd_bus_message *m, void *userdata, sd_bus_error *error) { struct context *c = userdata; int r; @@ -129,10 +129,10 @@ static int value_handler(sd_bus *bus, const char *path, const char *interface, c return 1; } -static int notify_test(sd_bus *bus, sd_bus_message *m, void *userdata, sd_bus_error *error) { +static int notify_test(sd_bus_message *m, void *userdata, sd_bus_error *error) { int r; - assert_se(sd_bus_emit_properties_changed(bus, m->path, "org.freedesktop.systemd.ValueTest", "Value", NULL) >= 0); + assert_se(sd_bus_emit_properties_changed(sd_bus_message_get_bus(m), m->path, "org.freedesktop.systemd.ValueTest", "Value", NULL) >= 0); r = sd_bus_reply_method_return(m, NULL); assert_se(r >= 0); @@ -140,10 +140,10 @@ static int notify_test(sd_bus *bus, sd_bus_message *m, void *userdata, sd_bus_er return 1; } -static int notify_test2(sd_bus *bus, sd_bus_message *m, void *userdata, sd_bus_error *error) { +static int notify_test2(sd_bus_message *m, void *userdata, sd_bus_error *error) { int r; - assert_se(sd_bus_emit_properties_changed_strv(bus, m->path, "org.freedesktop.systemd.ValueTest", NULL) >= 0); + assert_se(sd_bus_emit_properties_changed_strv(sd_bus_message_get_bus(m), m->path, "org.freedesktop.systemd.ValueTest", NULL) >= 0); r = sd_bus_reply_method_return(m, NULL); assert_se(r >= 0); @@ -151,10 +151,10 @@ static int notify_test2(sd_bus *bus, sd_bus_message *m, void *userdata, sd_bus_e return 1; } -static int emit_interfaces_added(sd_bus *bus, sd_bus_message *m, void *userdata, sd_bus_error *error) { +static int emit_interfaces_added(sd_bus_message *m, void *userdata, sd_bus_error *error) { int r; - assert_se(sd_bus_emit_interfaces_added(bus, m->path, "org.freedesktop.systemd.test", NULL) >= 0); + assert_se(sd_bus_emit_interfaces_added(sd_bus_message_get_bus(m), m->path, "org.freedesktop.systemd.test", NULL) >= 0); r = sd_bus_reply_method_return(m, NULL); assert_se(r >= 0); @@ -162,10 +162,10 @@ static int emit_interfaces_added(sd_bus *bus, sd_bus_message *m, void *userdata, return 1; } -static int emit_interfaces_removed(sd_bus *bus, sd_bus_message *m, void *userdata, sd_bus_error *error) { +static int emit_interfaces_removed(sd_bus_message *m, void *userdata, sd_bus_error *error) { int r; - assert_se(sd_bus_emit_interfaces_removed(bus, m->path, "org.freedesktop.systemd.test", NULL) >= 0); + assert_se(sd_bus_emit_interfaces_removed(sd_bus_message_get_bus(m), m->path, "org.freedesktop.systemd.test", NULL) >= 0); r = sd_bus_reply_method_return(m, NULL); assert_se(r >= 0); @@ -173,10 +173,10 @@ static int emit_interfaces_removed(sd_bus *bus, sd_bus_message *m, void *userdat return 1; } -static int emit_object_added(sd_bus *bus, sd_bus_message *m, void *userdata, sd_bus_error *error) { +static int emit_object_added(sd_bus_message *m, void *userdata, sd_bus_error *error) { int r; - assert_se(sd_bus_emit_object_added(bus, m->path) >= 0); + assert_se(sd_bus_emit_object_added(sd_bus_message_get_bus(m), m->path) >= 0); r = sd_bus_reply_method_return(m, NULL); assert_se(r >= 0); @@ -184,10 +184,10 @@ static int emit_object_added(sd_bus *bus, sd_bus_message *m, void *userdata, sd_ return 1; } -static int emit_object_removed(sd_bus *bus, sd_bus_message *m, void *userdata, sd_bus_error *error) { +static int emit_object_removed(sd_bus_message *m, void *userdata, sd_bus_error *error) { int r; - assert_se(sd_bus_emit_object_removed(bus, m->path) >= 0); + assert_se(sd_bus_emit_object_removed(sd_bus_message_get_bus(m), m->path) >= 0); r = sd_bus_reply_method_return(m, NULL); assert_se(r >= 0); |