Closed aiQon closed 1 year ago
Yeah, I just realized that as well. There are also other places where return codes are completely ignored (for instance sd_bus_open, sd_bus_open_user and sd_bus_open_system)
These should certainly be fixed. However, checking request_name was sufficient for my application. I have pushed the changes to their Gerrit instance.
I've been doing some work to try and fix all of these but it takes time to recover from the fallout where we depend on the error case not failing. I suspect this one and quite a few others will be trivial though.
request_name
now checks return code. Many others have been fixed as well. Please report any new ones.
I just noticed that if I try to request a name on dbus with
sdbusplus::bus::request_name
, I do not get a return code from the underlying implementation. This conveniently hid a bug with policy configuration in my case. Is there a reason for doing so or might a simplereturn
do the trick in the implementation?