[PATCH] Fix flawed logic for flags passed to dbus_bus_request_name()



Hi,

When building NetworkManager with D-Bus 1.0 the wrong a wrong define is
being used for the flags which are passed to dbus_bus_request_name().
The attached patch fixes this issue.

   Timo
--- src/NetworkManagerDbus.c	2006-11-12 22:00:43.000000000 +0100
+++ src/NetworkManagerDbus.c	2006-11-12 21:59:36.000000000 +0100
@@ -833,10 +833,10 @@
 	}
 
 	dbus_error_init (&error);
-#if (DBUS_VERSION_MAJOR == 0) && (DBUS_VERSION_MINOR >= 60)
-	flags = DBUS_NAME_FLAG_DO_NOT_QUEUE;	/* Prohibit replacement is now the default */
-#else
+#if (DBUS_VERSION_MAJOR == 0) && (DBUS_VERSION_MINOR < 60)
 	flags = DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT;
+#else
+	flags = DBUS_NAME_FLAG_DO_NOT_QUEUE;	/* Prohibit replacement is now the default */
 #endif
 	ret = dbus_bus_request_name (connection, NM_DBUS_SERVICE, flags, &error);
 	if (dbus_error_is_set (&error))


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]