]> git.ipfire.org Git - thirdparty/systemd.git/commit
sd-bus: always fill in sd_bus_error paramters, on error 973/head
authorLennart Poettering <lennart@poettering.net>
Sun, 16 Aug 2015 20:13:34 +0000 (22:13 +0200)
committerLennart Poettering <lennart@poettering.net>
Sun, 16 Aug 2015 20:13:34 +0000 (22:13 +0200)
commit759e02e79dd5e02becff6f34247aac9605ab410e
treec0ce13b125849bef3f53f5064052c30b35b28090
parent0d4605ec3c9c1392bb5f0abc590b1d855df5eebb
sd-bus: always fill in sd_bus_error paramters, on error

Whenever one of our calls is invoked with a non-NULL, writable
sd_bus_error parameter, let's fill in some valid error on failure. We
previously only filled in remote errors, but never local errors, which is
hard to handle by users. Hence, let's clean this up to always fill in
the error.

This introduces a new bus_assert_return() macro that works like
assert_return() but optionally also initializes a bus_error struct.

Fixes #224.

Based on a patch by Umut Tezduyar.
src/libsystemd/sd-bus/bus-convenience.c
src/libsystemd/sd-bus/bus-internal.h
src/libsystemd/sd-bus/sd-bus.c