On Fri, 2006-03-03 at 13:56 +0100, [EMAIL PROTECTED] wrote: > This patch work fine for me and "all changes are needed"
Alright, thanks. Dan, what do you think? It seems the real issue is that ndiswrapper doesn't want to be out of IW_MODE_AUTO, not that the set_mode() operation itself is costly. > + if (!strcmp (nm_device_get_driver (NM_DEVICE (self)), > "ndiswrapper")) { > + driver= g_malloc(sizeof(char)*(strlen("ndiswrapper")+1)); > + driver= strcpy(driver, "ndiswrapper"); > + } > + else if (!strcmp (nm_device_get_driver (NM_DEVICE (self)), > "ath_pci")) { > + driver= g_malloc(sizeof(char)*(strlen("madwifi")+1)); > + driver= strcpy(driver, "madwifi"); > + } > + else { > + driver= g_malloc(sizeof(char)*(strlen("wext")+1)); > + driver= strcpy(driver, "wext"); > + } > + aj2r, just as an FYI, you don't need dynamic allocations here. const char *driver = "madwifi"; is sufficient. As it stands, this code allocates both a static character array and a dynamic one. Just a tip ;-) Robert Love _______________________________________________ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list