From c9dc2dafc32f56f080cf2934cc445f6306beefa3 Mon Sep 17 00:00:00 2001 From: Samuel Ortiz Date: Sat, 11 Jul 2009 00:32:02 +0200 Subject: Add support for storing SSID details of hidden services When loading a hidden service from storage, we set the service and network name, along with the SSID. This way we can present a clean and usable service list to fetch connectable services from. --- plugins/supplicant.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/supplicant.c b/plugins/supplicant.c index 64396676..27ced441 100644 --- a/plugins/supplicant.c +++ b/plugins/supplicant.c @@ -1065,6 +1065,7 @@ static void properties_reply(DBusPendingCall *call, void *user_data) unsigned short channel, frequency; const char *mode, *security; char *group; + unsigned int ssid_len; DBG("task %p", task); @@ -1202,8 +1203,10 @@ static void properties_reply(DBusPendingCall *call, void *user_data) if (result.name != NULL && result.name[0] != '\0') connman_network_set_name(network, result.name); - connman_network_set_blob(network, "WiFi.SSID", - result.ssid, result.ssid_len); + if (connman_network_get_blob(network, "WiFi.SSID", &ssid_len) == NULL) { + connman_network_set_blob(network, "WiFi.SSID", + result.ssid, result.ssid_len); + } connman_network_set_string(network, "WiFi.Mode", mode); -- cgit v1.2.3