From: Michael Tremer Date: Tue, 24 Feb 2026 17:01:51 +0000 (+0000) Subject: bus: Log if we cannot connect to dbus X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dcd09a7f15f8f7410c57824800df29bd6bdd3bef;p=telemetry.git bus: Log if we cannot connect to dbus Signed-off-by: Michael Tremer --- diff --git a/src/daemon/bus.c b/src/daemon/bus.c index 26b77ff..907c967 100644 --- a/src/daemon/bus.c +++ b/src/daemon/bus.c @@ -34,6 +34,14 @@ static int td_bus_on_connect(sd_bus_message* m, void* data, sd_bus_error* error) { td_ctx* ctx = data; + // Show the error if set + if (sd_bus_error_is_set(error)) { + ERROR(ctx, "Failed to connect to D-Bus: %s\n", error->name); + + // Pass on the error + return sd_bus_error_get_errno(error); + } + // Log action DEBUG(ctx, "Connected to D-Bus\n");