diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-12-02 15:28:20 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-12-02 15:29:40 +0100 |
commit | 6717d473506800363af9d2bafbf263ee054e856d (patch) | |
tree | c25bf710e766bebf53d62303e7e52412de9dddde /src/libsystemd-bus/test-bus-objects.c | |
parent | 99f37ad86e114b2d1c9eaedf2bc1a0004a265d26 (diff) |
bus: when replying to an incoming message and the vtable contains the expected return signature generate an error if the response message doesn't match it
Diffstat (limited to 'src/libsystemd-bus/test-bus-objects.c')
-rw-r--r-- | src/libsystemd-bus/test-bus-objects.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libsystemd-bus/test-bus-objects.c b/src/libsystemd-bus/test-bus-objects.c index 95278e36e3..0ab7a148d3 100644 --- a/src/libsystemd-bus/test-bus-objects.c +++ b/src/libsystemd-bus/test-bus-objects.c @@ -61,6 +61,9 @@ static int something_handler(sd_bus *bus, sd_bus_message *m, void *userdata, sd_ log_info("AlterSomething() called, got %s, returning %s", s, n); + /* This should fail, since the return type doesn't match */ + assert_se(sd_bus_reply_method_return(m, "u", 4711) == -ENOMSG); + r = sd_bus_reply_method_return(m, "s", n); assert_se(r >= 0); |