From c309a2bc8a27a63b49552c3ecec20bdd6463b555 Mon Sep 17 00:00:00 2001 From: Simon Schampijer Date: Thu, 22 Apr 2010 17:14:33 -0700 Subject: [PATCH 1/5] wifi: fix B/G band adhoc wifi auto channel selection --- src/nm-wifi-ap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nm-wifi-ap.c b/src/nm-wifi-ap.c index 80b69a3980..c7b5d8a51a 100644 --- a/src/nm-wifi-ap.c +++ b/src/nm-wifi-ap.c @@ -1469,7 +1469,7 @@ channel_to_freq (guint32 channel, const char *band) } else if (!strcmp (band, "bg")) { while (bg_table[i].chan && (bg_table[i].chan != channel)) i++; - return a_table[i].freq; + return bg_table[i].freq; } return 0; From a4cc8873c9981176575c0939c63473b4206db72c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= Date: Fri, 23 Apr 2010 12:13:04 +0200 Subject: [PATCH 2/5] system-settings: fix loading connection by plugins The error case was as follows. When using 'ifupdown,keyfile' plugins and 'eth0' present in /etc/network/interfaces on a Debian-based system, 'ifupdown' plugin, in unmanaged mode, load_connections() prematurely and thus effectively blocked reading connections from 'keyfile' plugin. Patch by Dan and tested by me. --- src/system-settings/nm-sysconfig-settings.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/system-settings/nm-sysconfig-settings.c b/src/system-settings/nm-sysconfig-settings.c index 0054a9990f..4bcfb04bc7 100644 --- a/src/system-settings/nm-sysconfig-settings.c +++ b/src/system-settings/nm-sysconfig-settings.c @@ -357,8 +357,6 @@ add_plugin (NMSysconfigSettings *self, NMSystemConfigInterface *plugin) g_signal_connect (plugin, NM_SYSTEM_CONFIG_INTERFACE_CONNECTION_ADDED, G_CALLBACK (plugin_connection_added), self); - g_signal_connect (plugin, NM_SYSTEM_CONFIG_INTERFACE_UNMANAGED_SPECS_CHANGED, - G_CALLBACK (unmanaged_specs_changed), self); g_signal_connect (plugin, "notify::hostname", G_CALLBACK (hostname_changed), self); nm_system_config_interface_init (plugin, NULL); @@ -368,6 +366,9 @@ add_plugin (NMSysconfigSettings *self, NMSystemConfigInterface *plugin) NM_SYSTEM_CONFIG_INTERFACE_INFO, &pinfo, NULL); + g_signal_connect (plugin, NM_SYSTEM_CONFIG_INTERFACE_UNMANAGED_SPECS_CHANGED, + G_CALLBACK (unmanaged_specs_changed), self); + nm_log_info (LOGD_SYS_SET, "Loaded plugin %s: %s", pname, pinfo); g_free (pname); g_free (pinfo); @@ -1328,6 +1329,7 @@ nm_sysconfig_settings_new (const char *config_file, g_object_unref (self); return NULL; } + unmanaged_specs_changed (NULL, self); } return self; From 8315a03632f8b3eeb85ce63518fa3aa2e6917b7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= Date: Fri, 23 Apr 2010 13:12:41 +0200 Subject: [PATCH 3/5] core: return valid error to dbus-glib (rh #581794) --- src/nm-manager.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/nm-manager.c b/src/nm-manager.c index a24606ad99..6eaf6a51ef 100644 --- a/src/nm-manager.c +++ b/src/nm-manager.c @@ -2099,7 +2099,9 @@ system_get_secrets_idle_cb (gpointer user_data) connection = nm_settings_interface_get_connection_by_path (NM_SETTINGS_INTERFACE (priv->sys_settings), info->connection_path); if (!connection) { - error = g_error_new_literal (0, 0, "unknown connection (not exported by system settings)"); + error = g_error_new_literal (NM_MANAGER_ERROR, + NM_MANAGER_ERROR_UNKNOWN_CONNECTION, + "unknown connection (not exported by system settings)"); nm_secrets_provider_interface_get_secrets_result (info->provider, info->setting_name, info->caller, From b0548425d7920e1c3d9cd65754b663380e9051cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= Date: Fri, 23 Apr 2010 15:25:32 +0200 Subject: [PATCH 4/5] logging: log NetworkManager version; use distribution version when configured --- configure.ac | 8 ++++++++ src/main.c | 5 ++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index aedc8ec903..adfe67fe9b 100644 --- a/configure.ac +++ b/configure.ac @@ -164,6 +164,14 @@ if test x"$with_distro" = xpardus; then AC_DEFINE(TARGET_PARDUS, 1, [Define if you have Pardus]) fi +dnl +dnl Distribution version string +dnl +AC_ARG_WITH(dist-version, AS_HELP_STRING([--with-dist-version=], [Define the NM's distribution version string]), ac_distver=$withval, ac_distver="") +if ! test x"$ac_distver" = x""; then + AC_DEFINE_UNQUOTED(NM_DIST_VERSION, "$ac_distver", [Define the distribution version string]) +fi + AC_MSG_CHECKING([Linux Wireless Extensions >= 18]) AC_TRY_COMPILE([#ifndef __user #define __user diff --git a/src/main.c b/src/main.c index cce2939e39..6bb1121716 100644 --- a/src/main.c +++ b/src/main.c @@ -616,7 +616,10 @@ main (int argc, char *argv[]) nm_logging_start (become_daemon); - nm_log_info (LOGD_CORE, "starting..."); +#if !defined(NM_DIST_VERSION) +# define NM_DIST_VERSION VERSION +#endif + nm_log_info (LOGD_CORE, "NetworkManager-" NM_DIST_VERSION " is starting..."); success = FALSE; main_loop = g_main_loop_new (NULL, FALSE); From e46577ffe5b805e857d3de85530a4c6b8a10e83e Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Fri, 23 Apr 2010 12:12:47 -0700 Subject: [PATCH 5/5] core: rearrange version macros a bit --- src/main.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main.c b/src/main.c index 6bb1121716..1d0ab5328c 100644 --- a/src/main.c +++ b/src/main.c @@ -53,6 +53,10 @@ #include "nm-vpn-manager.h" #include "nm-logging.h" +#if !defined(NM_DIST_VERSION) +# define NM_DIST_VERSION VERSION +#endif + #define NM_DEFAULT_PID_FILE LOCALSTATEDIR"/run/NetworkManager.pid" #define NM_DEFAULT_SYSTEM_CONF_FILE SYSCONFDIR"/NetworkManager/NetworkManager.conf" #define NM_OLD_SYSTEM_CONF_FILE SYSCONFDIR"/NetworkManager/nm-system-settings.conf" @@ -616,10 +620,7 @@ main (int argc, char *argv[]) nm_logging_start (become_daemon); -#if !defined(NM_DIST_VERSION) -# define NM_DIST_VERSION VERSION -#endif - nm_log_info (LOGD_CORE, "NetworkManager-" NM_DIST_VERSION " is starting..."); + nm_log_info (LOGD_CORE, "NetworkManager (version " NM_DIST_VERSION ") is starting..."); success = FALSE; main_loop = g_main_loop_new (NULL, FALSE);