summaryrefslogtreecommitdiff
path: root/src/libsystemd-bus/test-bus-server.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-10-16 06:10:04 +0200
committerLennart Poettering <lennart@poettering.net>2013-10-16 06:15:02 +0200
commit40ca29a1370379d43e44c0ed425eecc7218dcbca (patch)
tree39cde46c8166bd79471b0111251693edddfae3c4 /src/libsystemd-bus/test-bus-server.c
parent7a37d62501c97eb3b48a418ef764d0308e0c3fb9 (diff)
timedated: use libsystemd-bus instead of libdbus for bus communication
Among other things this also adds a few things necessary for the change: - Considerably more powerful error returning APIs in libsystemd-bus - Adapter for connecting an sd_bus to an sd_event - As I reworked the PolicyKit logic to the new library I also made it asynchronous, so that PolicyKit requests of one user cannot block out another user anymore. - We always use the macro names for common bus error. That way it is harder to mistype them since the compiler will notice
Diffstat (limited to 'src/libsystemd-bus/test-bus-server.c')
-rw-r--r--src/libsystemd-bus/test-bus-server.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libsystemd-bus/test-bus-server.c b/src/libsystemd-bus/test-bus-server.c
index ef26a65d87..478a81e5cb 100644
--- a/src/libsystemd-bus/test-bus-server.c
+++ b/src/libsystemd-bus/test-bus-server.c
@@ -32,6 +32,7 @@
#include "sd-bus.h"
#include "bus-internal.h"
#include "bus-message.h"
+#include "bus-util.h"
struct context {
int fds[2];
@@ -98,7 +99,7 @@ static void *server(void *p) {
} else if (sd_bus_message_is_method_call(m, NULL, NULL)) {
r = sd_bus_message_new_method_error(
bus, m,
- &SD_BUS_ERROR_MAKE("org.freedesktop.DBus.Error.UnknownMethod", "Unknown method."),
+ &SD_BUS_ERROR_MAKE(SD_BUS_ERROR_UNKNOWN_METHOD, "Unknown method."),
&reply);
if (r < 0) {
log_error("Failed to allocate return: %s", strerror(-r));