On 10/18/24 15:27, Simon McVittie wrote:
Based on my limited understanding of the Ada language, it looks as though dbusada calls dbus_get_local_machine_id(), which has no good mechanism for reporting an error, and therefore will spam warnings to standard error (and possibly crash) if the D-Bus machine ID has not been set up correctly. This function should be considered deprecated.
dbusada does not call dbus_get_local_machine_id() on its own initiative, see the source code of the library. This function is part of the auto-generated thin binding though.
How do you deduce that dbusada calls this function?
Please prefer to use dbus_try_get_local_machine_id(), which takes a DBusError parameter and therefore can be used to report errors in whatever way is considered to be most appropriate by the caller. This has been available in upstream stable releases since dbus 1.12.0 (2017).
The dbus_try_get_local_machine_id() is also part of the thin layer and can be used by an application if it desires.
Kind regards, - reto

