[PATCH resend] Fix missing and empty WiFi APs issue after kill/restart
marcel at holtmann.org
Wed Jan 5 23:34:38 PST 2011
> From: Leena Gunda <leena.gunda at wipro.com>
> Fixes BMC#10454 and #11201
> When ConnMan is SIGKILLed and restarted WiFi plugin will reuse the existing interface. It will get a list of existing BSSs and for each BSS in the BSSs list, interface_bss_added() is called. In interface_bss_added() if there is a next DBusMessageIter iterator and if it is valid, it is assumed that the next iterator would contain the key/value pairs for the BSS properties and bss_property is invoked. But for the BSSs list the next iterator contains the object path of next BSS in the list. As a result we get no properties for the BSS and a GSupplicantNetwork is created with empty ssid etc.
> Also for the BSSs list, supplicant_dbus_array_foreach() is invoked with interface_bss_added() as callback. In interface_bss_added() the iter is moved to the next iterator. Now supplicant_dbus_array_foreach() again moves the iterator to next after the callback is invoked. As a result we end up moving the iterator twice and miss adding few BSS from the BSSs list. And hence the bug.
> interface_bss_added() is called with BSS followed by its properties only from signal_bss_added(). Whereas for CurrentBSS and BSSs list GetAll D-Bus method is invoked for fetching the BSS's properties.
> Separating the cases of BSS's being added with and without properties will fix the issue.
> gsupplicant/supplicant.c | 56 +++++++++++++++++++++++++++++++++++----------
> 1 files changed, 43 insertions(+), 13 deletions(-)
please redo this description and put it before ---. Also break it nicely
at 72 chars to that it becomes readable in git log on an 80 chars
More information about the connman