On Wed, 2016-04-13 at 10:36 +0200, Jose Blanquicet wrote:
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.
Applied, thanks!
---
src/service.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/service.c b/src/service.c
index 1fff483..361e8e4 100644
--- a/src/service.c
+++ b/src/service.c
@@ -5402,16 +5402,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")) {
@@ -5425,6 +5415,16 @@ static int service_indicate_state(struct
connman_service *service)
connman_network_set_bool(service->network,
"WiFi.UseWPS
", false);
}
+
This line contained a trailing whitespace, watch out for those in the
future. I fixed this in order not to have another worst case roundtrip
of 24h.
+ 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)
Patrik