Dan Williams wrote:
On Sun, 2008-01-06 at 17:37 +0100, Michael Biebl wrote:3.) man_page_section.patchAfter applying 2.), this patch fixes the sections (1->8) of NetworkManager(Dispatcher) (already in trunk).Please also do a cd man svn mv NetworkManager.1.in NetworkManager.8.in svn mv NetworkManagerDispatcher.1.in NetworkManagerDispatcher.8.inCommitted.
Forgot to update the sections/references in the man pages itself. Please apply attached man_section.patch too.
4.) no_gnome_disable_deprecated.patch That's required to allow nm-vpn-properties to compile with gtk-2.12. (already in trunk network-manager-applet)Committed.Remains the most controversial patch 5.) rfkill.patchI already brought this topic up: hal changed the signature killswitch dbus arguments from uint to int in hal_0.5.10. You modified my original patch to first try with uint, then with int (commit 3160). Unfortunately this doesn't work, as dbus will issue an assert with hal_0.5.10 as the status int variable has the wrong type. We could try to mess around with two status variables (int and uint), but this is ugly imho. As we already require a very recent libnl, which only up-to-date distros ship, I simply remove the support for hal < 0.5.10 and bumped the build dependencies in configure.in accordingly.I committed r3226 in which I took your suggestion to have two different variables for the different calls. Could you test? I haven't run-tested it yet but it looks correct to me (though I've been wrong before :).
Hm, I still get a lot of error messages: NetworkManager: <info> Wireless now enabled by radio killswitchprocess 12045: arguments to dbus_message_get_args() were incorrect, assertion "(error) == NULL || !dbus_error_is_set ((error))" failed in file dbus-message.c line 1667.
This is normally a bug in some application using the D-Bus library.process 12045: arguments to dbus_message_get_args() were incorrect, assertion "(error) == NULL || !dbus_error_is_set ((error))" failed in file dbus-message.c line 1667.
This is normally a bug in some application using the D-Bus library.NetworkManager: <info> Error getting killswitch power arguments: 0� - (null)
.... I have hal 0.5.10 btw.What about the attached patch hal_killswitch.patch instead, which adds a configure check and some ifdefs. I tested it with hal 0.5.10 and It's working fine (and should also with hal < 0.5.10, but please test). It has the advantage, that it get's rid of the error messages and you don't have to make 2 dbus calls for hal 0.5.10. The downside is, that the package has to be recompiled for a hal 0.5.9 -> hal 0.5.10 upgrade.
Cheers, Michael P.S: What about the Makefile cleanups for trunk I sent in my previous emails? I also prepared one for the stable branch. See attached built_sources.patch. -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?
Index: man/NetworkManager.8.in =================================================================== --- man/NetworkManager.8.in (Revision 3227) +++ man/NetworkManager.8.in (Arbeitskopie) @@ -1,8 +1,8 @@ -.\" NetworkManager(1) manual page +.\" NetworkManager(8) manual page .\" .\" Copyright (C) 2005 Robert Love .\" -.TH NETWORKMANAGER "1" +.TH NETWORKMANAGER "8" .SH NAME NetworkManager \- network management daemon .SH SYNOPSIS @@ -23,5 +23,5 @@ .I "--enable-test-devices" Enable support for virtual test devices. These are useful for debugging. .SH SEE ALSO -.BR NetworkManagerDispatcher (1), +.BR NetworkManagerDispatcher (8), .BR nm-tool (1) Index: man/NetworkManagerDispatcher.8.in =================================================================== --- man/NetworkManagerDispatcher.8.in (Revision 3227) +++ man/NetworkManagerDispatcher.8.in (Arbeitskopie) @@ -1,8 +1,8 @@ -.\" NetworkManager(1) manual page +.\" NetworkManager(8) manual page .\" .\" Copyright (C) 2005 Robert Love .\" -.TH NETWORKMANAGERDISPATCHER "1" +.TH NETWORKMANAGERDISPATCHER "8" .SH NAME NetworkManagerDispatcher \- daemon that runs commands in response to off/online .SH SYNOPSIS @@ -25,5 +25,5 @@ .SH FILES @sysconfdir@/NetworkManager/dispatcher.d .SH SEE ALSO -.BR NetworkManager (1), +.BR NetworkManager (8), .BR nm-tool (1) Index: man/nm-tool.1.in =================================================================== --- man/nm-tool.1.in (Revision 3227) +++ man/nm-tool.1.in (Arbeitskopie) @@ -11,5 +11,5 @@ The \fInm-tool\fP utility provides information about NetworkManager, device, and wireless networks. .SH SEE ALSO -.BR NetworkManager (1), -.BR NetworkManagerDispatcher (1) +.BR NetworkManager (8), +.BR NetworkManagerDispatcher (8)
Index: src/NetworkManager.c =================================================================== --- src/NetworkManager.c (Revision 3227) +++ src/NetworkManager.c (Arbeitskopie) @@ -341,8 +341,11 @@ { DBusError err; DBusMessage * reply = NULL; +#ifdef HAVE_HAL_0_5_10 gint32 int_status = 1; +#else guint32 uint_status = 1; +#endif g_return_if_fail (pcall != NULL); g_return_if_fail (data != NULL); @@ -368,23 +371,24 @@ /* Handle both HAL <= 0.5.9 which uses UINT and HAL >= 0.5.10 which * uses INT. */ +#ifdef HAVE_HAL_0_5_10 + if (!dbus_message_get_args (reply, &err, DBUS_TYPE_INT32, &int_status, DBUS_TYPE_INVALID)) { +#else if (!dbus_message_get_args (reply, &err, DBUS_TYPE_UINT32, &uint_status, DBUS_TYPE_INVALID)) { +#endif + if (!ks_err_message || strcmp (ks_err_message, err.message)) { + nm_info ("Error getting killswitch power arguments: %s - %s", err.name, err.message); + g_free (ks_err_message); + ks_err_message = g_strdup (err.message); + } dbus_error_free (&err); - - if (!dbus_message_get_args (reply, &err, DBUS_TYPE_INT32, &int_status, DBUS_TYPE_INVALID)) { - if (!ks_err_message || strcmp (ks_err_message, err.message)) { - nm_info ("Error getting killswitch power arguments: %s - %s", err.name, err.message); - g_free (ks_err_message); - ks_err_message = g_strdup (err.message); - } - dbus_error_free (&err); - goto out; - } else { - if (int_status == 0) - data->tmp_hw_rf_enabled = FALSE; - } + goto out; } else { +#ifdef HAVE_HAL_0_5_10 + if (int_status == 0) +#else if (uint_status == 0) +#endif data->tmp_hw_rf_enabled = FALSE; } Index: configure.in =================================================================== --- configure.in (Revision 3227) +++ configure.in (Arbeitskopie) @@ -144,6 +144,11 @@ PKG_CHECK_MODULES(HAL, hal >= 0.5.0) +PKG_CHECK_EXISTS([hal >= 0.5.10],[have_hal_0_5_10=yes],[have_hal_0_5_10=no]) +if test "$have_hal_0_5_10" = "yes"; then + AC_DEFINE([HAVE_HAL_0_5_10],[1],[Define if we have hal 0.5.10 or newer]) +fi + if test x"$with_gnome" != xno; then PKG_CHECK_MODULES(GTK, gtk+-2.0)
Index: src/Makefile.am =================================================================== --- src/Makefile.am (Revision 3227) +++ src/Makefile.am (Arbeitskopie) @@ -83,13 +83,10 @@ nm-marshal-main.c: nm-marshal.c nm-marshal.h -built_sources = \ +BUILT_SOURCES = \ nm-marshal.h \ - nm-marshal.c \ - $(NULL) + nm-marshal.c -$(NetworkManager_OBJECTS): $(built_sources) - NetworkManager_CPPFLAGS = \ $(DBUS_CFLAGS) \ $(GTHREAD_CFLAGS) \ @@ -154,5 +151,5 @@ $(mkinstalldirs) -m 0700 $(DESTDIR)$(rundir) $(mkinstalldirs) -m 0755 $(DESTDIR)$(dispatcherdir) -CLEANFILES = $(built_sources) +CLEANFILES = $(BUILT_SOURCES)
Attachment:
signature.asc
Description: OpenPGP digital signature