summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-03-26 02:51:00 -0700
committerMarcel Holtmann <marcel@holtmann.org>2009-03-26 02:51:00 -0700
commit8cba7d766c9c081091975595575ada98e34ad218 (patch)
tree27fd54be2c934627776ffbe18eb51aa48ace899a
parent3e3cba11f4644348cbcf87dc66d8bffbffc07d5a (diff)
downloadconnman-8cba7d766c9c081091975595575ada98e34ad218.tar.gz
connman-8cba7d766c9c081091975595575ada98e34ad218.tar.bz2
connman-8cba7d766c9c081091975595575ada98e34ad218.zip
Set SSID and BSSID if both information are available
-rw-r--r--plugins/supplicant.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/plugins/supplicant.c b/plugins/supplicant.c
index bc75f6cf..f78a3f5f 100644
--- a/plugins/supplicant.c
+++ b/plugins/supplicant.c
@@ -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);