From e8f14d0ffcd7ffadc53c957088f9c8a5d3e6e678 Mon Sep 17 00:00:00 2001 From: Robert Love Date: Mon, 22 May 2006 21:24:19 +0000 Subject: [PATCH] 2006-05-22 Robert Love * src/nm-device-802-11-wireless.c: Don't chain up to the parent's stage4_timeout on failure unless the wireless network is Ad-Hoc. 99% of the time there is a real problem with wireless, and a seemingly successful connection via Zeroconf just confuses the user. And that 1% of the time the network is probably Ad-Hoc, anyhow. git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1757 4912f4e0-d625-0410-9fb7-b9a5a253dbdc --- ChangeLog | 8 ++++++++ src/nm-device-802-11-wireless.c | 10 ++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index d44080b1c9..5046e1580e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2006-05-22 Robert Love + + * src/nm-device-802-11-wireless.c: Don't chain up to the parent's + stage4_timeout on failure unless the wireless network is Ad-Hoc. + 99% of the time there is a real problem with wireless, and a + seemingly successful connection via Zeroconf just confuses the user. + And that 1% of the time the network is probably Ad-Hoc, anyhow. + 2006-05-22 Robert Love * src/backends/NetworkManagerSuSE.c: Reload, do not restart, ypbind and diff --git a/src/nm-device-802-11-wireless.c b/src/nm-device-802-11-wireless.c index fb688bf630..dddc00f3b7 100644 --- a/src/nm-device-802-11-wireless.c +++ b/src/nm-device-802-11-wireless.c @@ -2979,16 +2979,22 @@ real_act_stage4_ip_config_timeout (NMDevice *dev, nm_dbus_get_user_key_for_network (data->dbus_connection, req, TRUE); ret = NM_ACT_STAGE_RETURN_POSTPONE; } - else + else if (nm_ap_get_mode (ap) == IW_MODE_ADHOC) { NMDevice80211WirelessClass * klass; NMDeviceClass * parent_class; - /* Chain up to parent */ + /* For Ad-Hoc networks, chain up to parent to get a Zeroconf IP */ klass = NM_DEVICE_802_11_WIRELESS_GET_CLASS (self); parent_class = NM_DEVICE_CLASS (g_type_class_peek_parent (klass)); ret = parent_class->act_stage4_ip_config_timeout (dev, req, &real_config); } + else + { + /* Non-encrypted network and IP configure failed. Alert the user. */ + ret = NM_ACT_STAGE_RETURN_FAILURE; + } + *config = real_config; return ret;