GNOME Bugzilla – Bug 119471
N/A when more than one interface
Last modified: 2014-10-10 14:34:19 UTC
Hello, The wireless applet fails to handle more than one interface properly. The applet displays N/A in this case. --- wireless-applet.c.orig 2003-07-23 10:49:45.000000000 +0200 +++ wireless-applet.c 2003-07-21 12:51:20.000000000 +0200 @@ -443,7 +448,7 @@ if (g_list_length (applet->devices)==1) { wireless_applet_set_device (applet, (char*)applet->devices->data); - } else { + } else if (g_list_length (applet->devices)==0) { wireless_applet_update_state (applet, applet->device, -1, -1, -1); }
*** Bug 108565 has been marked as a duplicate of this bug. ***
We need to review this and get it in.
I don't understand how this fixes anything. If the list length is not 1 or 0 then in your patch the applet does not call wireless_applet_update_state at all. Shouldn't we loop over all the devices here and call wireless_applet_update_state on each device.
wireless_applet_update_state() is called, as expected, in the while loop above, if the device name read from the /proc file matches applet->device, so the applet update is done at this level. The test following this loop, is used for another purpose : to automatically set the default device when only one is available from /proc, else to return "N/A" (meaning here for me, when zero matching device is available). For any other length (>1), the default device has to be selected with the GUI. According to the current code, in the case of two wireless interfaces, if we suppose that one of them matches applet->device, wireless_applet_update_state() gets called successfully in the while() loop for this device. And when exiting from the loop, this update is overwritten because g_list_length()==2.
*** Bug 133095 has been marked as a duplicate of this bug. ***
*** This bug has been marked as a duplicate of 139336 ***
This component does not exist anymore so these bugs can be removed from their group.