On Tue, 2007-01-09 at 22:44 +0000, Eugéne Suter wrote: > The OP was told that DBUS 1.0 needs a patch, but I'm using DBUS 1.0.1, > so shouldn't that already be fixed? It's not that D-Bus 1.0 needs a patch - it's that NM needs a patch in order to work with the newer D-Bus. > If I do need to apply the patch, where can I get it and how can I > apply it to the dbus source, so that I can rebuild my DBUS package? I've attached the one I've been using, which fixes a couple of D-Bus compatibility issues. To apply it, save it somewhere, and run the following command from within the NM source tree: patch -Np1 -i /path/to/patch/NetworkManager-0.6.4-dbus_api.patch Then configure and build as normal. Simon.
diff -Naur NetworkManager-0.6.4/gnome/libnm_glib/libnm_glib.c NetworkManager-0.6.4-new/gnome/libnm_glib/libnm_glib.c
--- NetworkManager-0.6.4/gnome/libnm_glib/libnm_glib.c 2006-05-06 03:36:46.000000000 +1200
+++ NetworkManager-0.6.4-new/gnome/libnm_glib/libnm_glib.c 2006-07-27 21:37:45.000000000 +1200
@@ -230,7 +230,7 @@
{
/* Try to reactivate our connection to dbus on the next pass through the event loop */
ctx->nm_state = LIBNM_NO_DBUS;
- dbus_connection_disconnect (ctx->dbus_con);
+ dbus_connection_close (ctx->dbus_con);
libnm_glib_schedule_dbus_watcher (ctx);
}
else if (dbus_message_is_signal (message, DBUS_INTERFACE_DBUS, "NameOwnerChanged"))
@@ -444,7 +444,7 @@
g_main_loop_unref (ctx->g_main_loop);
if (ctx->dbus_con)
- dbus_connection_disconnect (ctx->dbus_con);
+ dbus_connection_close (ctx->dbus_con);
if (ctx->callbacks_lock)
g_mutex_free (ctx->callbacks_lock);
diff -Naur NetworkManager-0.6.4/src/NetworkManagerDbus.c NetworkManager-0.6.4-new/src/NetworkManagerDbus.c
--- NetworkManager-0.6.4/src/NetworkManagerDbus.c 2006-05-22 05:28:02.000000000 +1200
+++ NetworkManager-0.6.4-new/src/NetworkManagerDbus.c 2006-11-13 19:37:05.000000000 +1300
@@ -831,10 +831,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))
Attachment:
signature.asc
Description: This is a digitally signed message part