diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-10-16 06:04:20 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-10-16 06:15:01 +0200 |
commit | 7a37d62501c97eb3b48a418ef764d0308e0c3fb9 (patch) | |
tree | 604415be5921808f8351e59892482067c584494a /src/libsystemd-bus/sd-bus.c | |
parent | 8efd6381798d0cfcba6f98c5a81f9b296ad49733 (diff) |
bus: return 1 on all calls that send messages
This way they are nicer to use from method dispatch callbacks as last
call, since method dispatch callbacks expect > 0 return if the message
got handled.
Diffstat (limited to 'src/libsystemd-bus/sd-bus.c')
-rw-r--r-- | src/libsystemd-bus/sd-bus.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsystemd-bus/sd-bus.c b/src/libsystemd-bus/sd-bus.c index ac886e9d57..5d1fcd90a0 100644 --- a/src/libsystemd-bus/sd-bus.c +++ b/src/libsystemd-bus/sd-bus.c @@ -1231,7 +1231,7 @@ int sd_bus_send(sd_bus *bus, sd_bus_message *m, uint64_t *serial) { /* If this is a reply and no reply was requested, then let's * suppress this, if we can */ if (m->dont_send && !serial) - return 0; + return 1; if ((bus->state == BUS_RUNNING || bus->state == BUS_HELLO) && bus->wqueue_size <= 0) { size_t idx = 0; @@ -1273,7 +1273,7 @@ int sd_bus_send(sd_bus *bus, sd_bus_message *m, uint64_t *serial) { if (serial) *serial = BUS_MESSAGE_SERIAL(m); - return 0; + return 1; } static usec_t calc_elapse(uint64_t usec) { @@ -1482,7 +1482,7 @@ int sd_bus_send_with_reply_and_block( else sd_bus_message_unref(incoming); - return 0; + return 1; } if (incoming->header->type == SD_BUS_MESSAGE_TYPE_METHOD_ERROR) { |