Hello Tomasz,
I tested your patch and it works when there is only one provisioned hidden
service (as expected).
I will use this patch for now.
Thanks and Regards
~Sameer
On Fri, Mar 1, 2013 at 4:47 PM, Tomasz Bursztyka <
tomasz.burszt...@linux.intel.com> wrote:
> Currently, it relies on max_ssids to know how many SSIDs it can provide as
> paremeters. However, patch 6af0579c434058536fb40480f40f5e9895cfe863, which
> fixes an issue about fast scanning, affects such feature.
>
> Therefore, as a default, it will fallback to 1 if given max_ssids is 0.
>
> There is still the issue that it will autoscan only max_ssid (1 or more)
> known hidden SSIDs. This need to be fixed.
>
> Reported by Sameer Naik
> ---
>
> Dumb test to change, sorry.
>
> plugins/wifi.c | 31 +++
> 1 file changed, 15 insertions(+), 16 deletions(-)
>
> diff --git a/plugins/wifi.c b/plugins/wifi.c
> index 4b097fc..d5a20b3 100644
> --- a/plugins/wifi.c
> +++ b/plugins/wifi.c
> @@ -530,7 +530,8 @@ static void scan_callback_hidden(int result,
> {
> struct connman_device *device = user_data;
> struct wifi_data *wifi = connman_device_get_data(device);
> - int driver_max_ssids;
> + GSupplicantScanParams *scan_params;
> + int driver_max_ssids, ret;
>
> DBG("result %d wifi %p", result, wifi);
>
> @@ -539,32 +540,30 @@ static void scan_callback_hidden(int result,
>
> /*
> * Scan hidden networks so that we can autoconnect to them.
> +* We will assume 1 as a default number of ssid to scan.
> */
> driver_max_ssids = g_supplicant_interface_get_max_scan_ssids(
> wifi->interface);
> - DBG("max ssids %d", driver_max_ssids);
> + if (driver_max_ssids == 0)
> + driver_max_ssids = 1;
>
> - if (driver_max_ssids > 0) {
> - GSupplicantScanParams *scan_params;
> - int ret;
> + DBG("max ssids %d", driver_max_ssids);
>
> - scan_params = g_try_malloc0(sizeof(GSupplicantScanParams));
> - if (scan_params == NULL)
> - goto out;
> + scan_params = g_try_malloc0(sizeof(GSupplicantScanParams));
> + if (scan_params == NULL)
> + goto out;
>
> - if (get_hidden_connections(driver_max_ssids,
> - scan_params) > 0) {
> - ret = g_supplicant_interface_scan(wifi->interface,
> + if (get_hidden_connections(driver_max_ssids, scan_params) > 0) {
> + ret = g_supplicant_interface_scan(wifi->interface,
> scan_params,
> scan_callback,
> device);
> - if (ret == 0)
> - return;
> - }
> -
> - g_supplicant_free_scan_params(scan_params);
> + if (ret == 0)
> + return;
> }
>
> + g_supplicant_free_scan_params(scan_params);
> +
> out:
> scan_callback(result, interface, user_data);
> }
> --
> 1.8.1.4
>
> ___
> connman mailing list
> connman@connman.net
> http://lists.connman.net/listinfo/connman
>
___
connman mailing list
connman@connman.net
http://lists.connman.net/listinfo/connman