summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Blanquicet <blanquicet@gmail.com>2016-04-13 10:36:01 +0200
committerPatrik Flykt <patrik.flykt@linux.intel.com>2016-04-14 09:31:49 +0300
commita84f5f7a72455a8ad0cbdc261331c97c54490d35 (patch)
tree866abb5d887bee22ff29244ee81a4942690b94c6
parentea49f026076292c546b1280881911e479063e6e1 (diff)
downloadconnman-a84f5f7a72455a8ad0cbdc261331c97c54490d35.tar.gz
service: Store passphrase after successfull WPS provisioning
When WPS Provisioning finished successfully, the passphrase gotten from the WPS Credentials is stored first in the network structure in handle_wps_completion() and then on the service structure in service_indicate_state(). The problems is that the service's settings file is created/updated through service_save() before updating the service structure with the new passphrase. Therefore, the passphrase is not actually written in the file. This patch moves the updating of the passphrase before storing the information in the settings file.
-rw-r--r--src/service.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/service.c b/src/service.c
index d6aeb973..a54e4da4 100644
--- a/src/service.c
+++ b/src/service.c
@@ -5405,16 +5405,6 @@ static int service_indicate_state(struct connman_service *service)
reply_pending(service, 0);
- g_get_current_time(&service->modified);
- service_save(service);
-
- dns_changed(service);
- domain_changed(service);
- proxy_changed(service);
-
- if (old_state != CONNMAN_SERVICE_STATE_ONLINE)
- __connman_notifier_connect(service->type);
-
if (service->type == CONNMAN_SERVICE_TYPE_WIFI &&
connman_network_get_bool(service->network,
"WiFi.UseWPS")) {
@@ -5429,6 +5419,16 @@ static int service_indicate_state(struct connman_service *service)
"WiFi.UseWPS", false);
}
+ g_get_current_time(&service->modified);
+ service_save(service);
+
+ dns_changed(service);
+ domain_changed(service);
+ proxy_changed(service);
+
+ if (old_state != CONNMAN_SERVICE_STATE_ONLINE)
+ __connman_notifier_connect(service->type);
+
method = __connman_ipconfig_get_method(service->ipconfig_ipv6);
if (method == CONNMAN_IPCONFIG_METHOD_OFF)
__connman_ipconfig_disable_ipv6(