Use the scan_ssid supplicant attribute for all connections
authorSamuel Ortiz <sameo@linux.intel.com>
Fri, 10 Jul 2009 22:32:01 +0000 (00:32 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Sat, 11 Jul 2009 19:45:37 +0000 (12:45 -0700)
Since we now have properly set hidden network, we may now end up trying to
connect to a hidden SSID from a network that comes with a set BSSID.

For handling this kind of situation we need to set scan_ssid by default to 1.

plugins/supplicant.c

index 832509a..6439667 100644 (file)
@@ -715,6 +715,7 @@ static int set_network(struct supplicant_task *task,
        DBusMessage *message, *reply;
        DBusMessageIter array, dict;
        DBusError error;
+       dbus_uint32_t scan_ssid = 1;
 
        DBG("task %p", task);
 
@@ -733,11 +734,10 @@ static int set_network(struct supplicant_task *task,
                        DBUS_TYPE_STRING_AS_STRING DBUS_TYPE_VARIANT_AS_STRING
                        DBUS_DICT_ENTRY_END_CHAR_AS_STRING, &dict);
 
-       if (address == NULL) {
-               dbus_uint32_t scan_ssid = 1;
-               connman_dbus_dict_append_variant(&dict, "scan_ssid",
-                                               DBUS_TYPE_UINT32, &scan_ssid);
-       } else
+       connman_dbus_dict_append_variant(&dict, "scan_ssid",
+                                        DBUS_TYPE_UINT32, &scan_ssid);
+
+       if (address)
                connman_dbus_dict_append_variant(&dict, "bssid",
                                                DBUS_TYPE_STRING, &address);