]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
Fix test-shutdown bail out on Windows
authorRalf Habacker <ralf.habacker@freenet.de>
Wed, 24 Oct 2018 10:03:14 +0000 (12:03 +0200)
committerSimon McVittie <smcv@collabora.com>
Wed, 5 Dec 2018 10:55:28 +0000 (10:55 +0000)
test-shutdown expects a GUID in the bus address by default,
which is not available under Windows, because on this platform
an autolaunch address is provided by dbus-run-session and is
not returned by dbus-daemon.

Bug: https://gitlab.freedesktop.org/dbus/dbus/merge_requests/59
Reviewed-by: Simon McVittie <smcv@collabora.com>
test/name-test/test-shutdown.c

index b195bbb717caef38a6fa5dfaf22aa3b22f1d9d3a..26b610084ea59fd72767c627223531b09c284749 100644 (file)
@@ -21,15 +21,19 @@ open_destroy_shared_session_bus_connection (void)
   DBusConnection *connection;
   char *session_addr_no_guid;
   char *comma;
-  
+
   dbus_error_init (&error);
 
   session_addr_no_guid = strdup (getenv ("DBUS_SESSION_BUS_ADDRESS"));
   comma = strchr (session_addr_no_guid, ',');
-  if (comma == NULL)
-    die ("Couldn't find GUID in session bus address");
+
+#ifdef DBUS_WIN
+  _dbus_assert (comma == NULL);
+#else
+  _dbus_assert (comma != NULL);
   *comma = '\0';
-    
+#endif
+
   connection = dbus_connection_open (session_addr_no_guid, &error);
   free (session_addr_no_guid);
   if (connection == NULL)