[network-manager-applet] 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] applet: don't assert when auto connections can't be made (rh #532680)
- Date: Sat, 7 Nov 2009 01:56:13 +0000 (UTC)
commit 7dc597c0bf8948db81e899e836e4e9ad0a72f48e
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 9a1c239..bd487b0 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 a944970..b7674f8 100644
--- a/src/applet.c
+++ b/src/applet.c
@@ -317,7 +317,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]