diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-07-09 11:12:33 +0200 |
---|---|---|
committer | Lukáš Nykrýn <lnykryn@redhat.com> | 2019-05-03 12:50:30 +0200 |
commit | 3924b6cf7e42e624a4bcf10f4f0cac3f717ecb5f (patch) | |
tree | 5757b60f79f000ff2b6257ded99b282df76546b6 /src/libsystemd/sd-bus/bus-message.c | |
parent | a2da2b45ac05ef91074e90097115e8c734ca0f64 (diff) | |
download | systemd-3924b6cf7e42e624a4bcf10f4f0cac3f717ecb5f.tar.gz |
bus-message: let's always use -EBADMSG when the message is bad
-EINVAL means the arguments were somehow wrong, so translate the code we get
internally into -EBADMSG when returning.
(cherry picked from commit 69bd42ca072dfb2f7603b1f82053063293ab54b5)
Resolves: #1696224
Diffstat (limited to 'src/libsystemd/sd-bus/bus-message.c')
-rw-r--r-- | src/libsystemd/sd-bus/bus-message.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c index 1d06fcb80e..83f17436a1 100644 --- a/src/libsystemd/sd-bus/bus-message.c +++ b/src/libsystemd/sd-bus/bus-message.c @@ -5414,6 +5414,8 @@ int bus_message_parse_fields(sd_bus_message *m) { &m->root_container.item_size, &m->root_container.offsets, &m->root_container.n_offsets); + if (r == -EINVAL) + return -EBADMSG; if (r < 0) return r; } |