Enhance dbus error reporting and logging
When an error condition is encountered in a sdbus method handler,
don't try to send a reply with an outstanding error condition, which
will end up being rejected by DBus. Use helper sd_bus_set_error_x()
whose return value will be the error itself and can be returned
directly. Additionally, add more informational debug messages
in several occasions.
Tested: manually insert "goto" to trigger the error conditions and
verify that dbus-monitor no longer see rejected message replies.
Resolve openbmc/opembmc#3488
Change-Id: Ic5c3624f21db3c2d0dbaca6f11e8054adc4c0585
Signed-off-by: Kun Yi <kunyi731@gmail.com>
1 file changed