[network-manager-applet/NETWORKMANAGER_APPLET_0_7] applet: don't assert when auto connections can't be made (rh #532680)
- From: Dan Williams <dcbw src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [network-manager-applet/NETWORKMANAGER_APPLET_0_7] applet: don't assert when auto connections can't be made (rh #532680)
- Date: Sat, 7 Nov 2009 01:56:08 +0000 (UTC)
commit aca0228a6132b05d1c8efe46ec80db563bcc9268
Author: Dan Williams <dcbw redhat com>
Date: Fri Nov 6 17:53:59 2009 -0800
applet: don't assert when auto connections can't be made (rh #532680)
And log unsupported AP attributes so we have a hope of figuring
out what went wrong.
src/applet-device-wifi.c | 10 ++++++++--
src/applet.c | 2 +-
2 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/src/applet-device-wifi.c b/src/applet-device-wifi.c
index 141b524..6db26b2 100644
--- a/src/applet-device-wifi.c
+++ b/src/applet-device-wifi.c
@@ -367,8 +367,15 @@ wireless_new_auto_connection (NMDevice *device,
dev_caps = nm_device_wifi_get_capabilities (NM_DEVICE_WIFI (device));
s_wireless_sec = get_security_for_ap (info->ap, dev_caps, &supported, &s_8021x);
if (!supported) {
+ g_warning ("Unsupported AP configuration: dev_caps 0x%X, ap_flags 0x%X, "
+ "wpa_flags 0x%X, rsn_flags 0x%x, mode %d",
+ dev_caps,
+ nm_access_point_get_flags (info->ap),
+ nm_access_point_get_wpa_flags (info->ap),
+ nm_access_point_get_rsn_flags (info->ap),
+ nm_access_point_get_mode (info->ap));
g_object_unref (s_wireless);
- goto done;
+ return FALSE;
} else if (s_wireless_sec)
g_object_set (s_wireless, NM_SETTING_WIRELESS_SEC, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, NULL);
@@ -398,7 +405,6 @@ wireless_new_auto_connection (NMDevice *device,
nm_connection_add_setting (connection, NM_SETTING (s_con));
-done:
(*callback) (connection, TRUE, FALSE, callback_data);
return TRUE;
}
diff --git a/src/applet.c b/src/applet.c
index a31f65a..2e34707 100644
--- a/src/applet.c
+++ b/src/applet.c
@@ -330,7 +330,7 @@ applet_menu_item_activate_helper_part2 (NMConnection *connection,
return;
}
- g_assert (connection);
+ g_return_if_fail (connection != NULL);
if (!auto_created)
is_system = is_system_connection (connection);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]