summaryrefslogtreecommitdiff
path: root/src/libsystemd-bus/test-bus-chat.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-05-16 21:14:56 +0200
committerLennart Poettering <lennart@poettering.net>2013-05-16 21:14:56 +0200
commiteb01ba5de14859d7a94835ab9299de40132d549a (patch)
tree20f8cbe2b30ee9f9c558e39b8ee1e50a3cc3d728 /src/libsystemd-bus/test-bus-chat.c
parent5cbe749238f62546f70d81173a2778f3982adb03 (diff)
bus: synthesize timeout message errors instead of returning error codes
Diffstat (limited to 'src/libsystemd-bus/test-bus-chat.c')
-rw-r--r--src/libsystemd-bus/test-bus-chat.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libsystemd-bus/test-bus-chat.c b/src/libsystemd-bus/test-bus-chat.c
index f457c8f88a..f308eddbb0 100644
--- a/src/libsystemd-bus/test-bus-chat.c
+++ b/src/libsystemd-bus/test-bus-chat.c
@@ -35,17 +35,17 @@
#include "bus-match.h"
#include "bus-internal.h"
-static int match_callback(sd_bus *bus, int error, sd_bus_message *m, void *userdata) {
+static int match_callback(sd_bus *bus, sd_bus_message *m, void *userdata) {
log_info("Match triggered! interface=%s member=%s", strna(sd_bus_message_get_interface(m)), strna(sd_bus_message_get_member(m)));
return 0;
}
-static int object_callback(sd_bus *bus, int error, sd_bus_message *m, void *userdata) {
+static int object_callback(sd_bus *bus, sd_bus_message *m, void *userdata) {
int r;
assert(bus);
- if (error != 0)
+ if (sd_bus_message_is_method_error(m, NULL))
return 0;
if (sd_bus_message_is_method_call(m, "org.object.test", "Foobar")) {
@@ -356,10 +356,10 @@ finish:
return INT_TO_PTR(r);
}
-static int quit_callback(sd_bus *b, int ret, sd_bus_message *m, void *userdata) {
+static int quit_callback(sd_bus *b, sd_bus_message *m, void *userdata) {
bool *x = userdata;
- log_error("Quit callback: %s", strerror(ret));
+ log_error("Quit callback: %s", strerror(bus_message_to_errno(m)));
*x = 1;
return 1;