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

Bug#262624: Mutter mutter



It'd be nice if reportbug had made it more obvious that attaching the patch
had failed...

-- 
linux.conf.au 2005   -  http://lca2005.linux.org.au/  -  Birthplace of Tux
April 18th to 23rd   -  http://lca2005.linux.org.au/  -       LINUX
Canberra, Australia  -  http://lca2005.linux.org.au/  -    Get bitten!
Common subdirectories: netcfg-1.01.orig/debian and netcfg-1.01/debian
diff -u netcfg-1.01.orig/wireless.c netcfg-1.01/wireless.c
--- netcfg-1.01.orig/wireless.c	2004-05-17 08:48:39.000000000 +1000
+++ netcfg-1.01/wireless.c	2004-09-11 14:33:35.000000000 +1000
@@ -173,6 +173,7 @@
   char* rv = NULL;
   int ret, keylen;
   unsigned char buf [IW_ENCODING_TOKEN_MAX];
+  struct iwreq wrq;
   
   iw_get_basic_config (wfd, iface, &wconf);
 
@@ -215,15 +216,13 @@
     rv = client->value;
   }
 
-  wconf.has_key = 1;
-  wconf.key_size = keylen;
-  wconf.key_flags = IW_ENCODE_ENABLED | IW_ENCODE_OPEN;
-  
-  strncpy (wconf.key, buf, keylen);
-
-  wepkey = strdup(rv);
+  wrq.u.data.pointer = buf;
+  wrq.u.data.flags = 0;
 
-  iw_set_basic_config (wfd, iface, &wconf);
+  if (iw_set_ext(skfd, iface, SIOCSIWENCODE, &wrq) < 0) {
+    return -1;
+  }
 
   return 0;
+
 }

Reply to: