Set SSID and BSSID if both information are available
authorMarcel Holtmann <marcel@holtmann.org>
Thu, 26 Mar 2009 09:51:00 +0000 (02:51 -0700)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 26 Mar 2009 09:51:00 +0000 (02:51 -0700)
plugins/supplicant.c

index bc75f6cfc216fa27a3124b46279b814cd6f25f07..f78a3f5fae272cc6922c9e654a1c008501e9c8d9 100644 (file)
@@ -680,11 +680,12 @@ 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 (len > 0 && address == NULL) {
-               const char *scan = "1";
-
-               connman_dbus_dict_append_variant(&dict, "scan_ssid",
+       if (len > 0) {
+               if (address == NULL) {
+                       const char *scan = "1";
+                       connman_dbus_dict_append_variant(&dict, "scan_ssid",
                                                DBUS_TYPE_STRING, &scan);
+               }
 
                connman_dbus_dict_append_array(&dict, "ssid",
                                        DBUS_TYPE_BYTE, &network, len);