From: Ralf Habacker Date: Sat, 18 Apr 2020 08:52:37 +0000 (+0200) Subject: In dbus_get_autolaunch_address() return all errors as dbus error X-Git-Tag: dbus-1.13.16~13^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=faef720d9ddc40d8f1121ca31dd294d73defe927;p=thirdparty%2Fdbus.git In dbus_get_autolaunch_address() return all errors as dbus error This provides a consistent error reporting. Fixes #191 --- diff --git a/dbus/dbus-sysdeps-win.c b/dbus/dbus-sysdeps-win.c index 1f7d0ae29..964d5391e 100644 --- a/dbus/dbus-sysdeps-win.c +++ b/dbus/dbus-sysdeps-win.c @@ -3189,10 +3189,12 @@ _dbus_get_autolaunch_address (const char *scope, DBusString *address, *ext_idx = '\0'; if (!SearchPathA (dbus_module_path, daemon_name, NULL, sizeof(dbus_exe_path), dbus_exe_path, &lpFile)) { - dbus_set_error_const (error, DBUS_ERROR_FAILED, "could not find dbus-daemon executable"); + dbus_set_error (error, DBUS_ERROR_FAILED, + "Could not find dbus-daemon executable. " + "Please add the path to %s to your PATH " + "environment variable or start the daemon manually", + daemon_name); retval = FALSE; - fprintf (stderr, "please add the path to %s to your PATH environment variable\n", daemon_name); - fprintf (stderr, "or start the daemon manually\n\n"); goto out; } _dbus_verbose ("found dbus daemon executable at %s", dbus_module_path);