[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#490382: netcfg: Wireless configuration issues with ath5k



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Netcfg's current behavior is to associate to any open access point. Even
if the user sets an essid when reconfiguring wireless, if the essid is
hidden, netcfg will default to another open access point as there is no
actual essid string to choose from if its hidden. This patch changes the
behavior to use the essid that the user has set if he/she goes back and
reconfigures the wireless network.
Personally I would rather change the default behaviour around to ask for
an essid first and then default to open/any if the user doesn't supply
an essid himself.

Cheers

Glenn
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkh4oEgACgkQV8GyuTwyskPURQCgls7/8oY7pE25F4P7pv5NMZu5
3+4AniXWOkUAIcIYaEH4ilgehzE6yQ6Q
=AxjX
-----END PGP SIGNATURE-----
>From 91f7879b5f483ffeb8e3489986689a78280591c8 Mon Sep 17 00:00:00 2001
From: Glenn Saberton <gsaberton@foomagic.org>
Date: Sat, 12 Jul 2008 19:59:39 +0800
Subject: [PATCH] Fix ap selection when user sets it

The previous behaviour of netcfg is to check if either its associated or the user hasn't set an essid. This patch sets the essid if the user goes back to
reconfigure the network.
---
 packages/netcfg/wireless.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/packages/netcfg/wireless.c b/packages/netcfg/wireless.c
index ed07b8a..936a672 100644
--- a/packages/netcfg/wireless.c
+++ b/packages/netcfg/wireless.c
@@ -62,8 +62,8 @@ int netcfg_wireless_set_essid (struct debconfclient * client, char *iface, char*
     tf = strdup(client->value);
     
 automatic:
-    /* question not asked or user doesn't care or we're successfully associated */
-    if (!empty_str(wconf.essid) || empty_str(client->value)) 
+    /* first time around we default to any ap, if the user subsequently sets one, use it */
+    if (strlen(client->value) == 0) 
     {
         int i, success = 0;
         
-- 
1.5.6.2


Reply to: