Detach ctrl_iface monitor if the client socket is removed
[wpasupplicant] / wpa_supplicant / config_winreg.c
index 48ce603..456d417 100644 (file)
  *
  * See README and COPYING for more details.
  *
- * This file implements a configuration backend for Windows registry.. All the
+ * This file implements a configuration backend for Windows registry. All the
  * configuration information is stored in the registry and the format for
  * network configuration fields is same as described in the sample
  * configuration file, wpa_supplicant.conf.
  *
- * Configuration data is in HKEY_LOCAL_MACHINE\SOFTWARE\wpa_supplicant\configs
+ * Configuration data is in
+ * \a HKEY_LOCAL_MACHINE\\SOFTWARE\\%wpa_supplicant\\configs
  * key. Each configuration profile has its own key under this. In terms of text
  * files, each profile would map to a separate text file with possibly multiple
  * networks. Under each profile, there is a networks key that lists all
  * network block in the configuration file. In addition, blobs subkey has
  * possible blobs as values.
  *
- * HKEY_LOCAL_MACHINE\SOFTWARE\wpa_supplicant\configs\test\networks\0000
- *    ssid="example"
- *    key_mgmt=WPA-PSK
+ * Example network configuration block:
+ * \verbatim
+HKEY_LOCAL_MACHINE\SOFTWARE\wpa_supplicant\configs\test\networks\0000
+   ssid="example"
+   key_mgmt=WPA-PSK
+\endverbatim
  */
 
 #include "includes.h"
@@ -247,6 +251,8 @@ static int wpa_config_read_global(struct wpa_config *config, HKEY hk)
                hk, TEXT("device_type"));
        if (wpa_config_read_global_os_version(config, hk))
                errors++;
+       wpa_config_read_reg_dword(hk, TEXT("wps_cred_processing"),
+                                 &config->wps_cred_processing);
 #endif /* CONFIG_WPS */
 
        return errors ? -1 : 0;
@@ -551,7 +557,7 @@ static int wpa_config_write_global(struct wpa_config *config, HKEY hk)
                                   config->update_config,
                                   0);
 #ifdef CONFIG_WPS
-       if (is_nil_uuid(config->uuid)) {
+       if (!is_nil_uuid(config->uuid)) {
                char buf[40];
                uuid_bin2str(config->uuid, buf, sizeof(buf));
                wpa_config_write_reg_string(hk, "uuid", buf);
@@ -569,6 +575,8 @@ static int wpa_config_write_global(struct wpa_config *config, HKEY hk)
                            WPA_GET_BE32(config->os_version));
                wpa_config_write_reg_string(hk, "os_version", vbuf);
        }
+       wpa_config_write_reg_dword(hk, TEXT("wps_cred_processing"),
+                                  config->wps_cred_processing, 0);
 #endif /* CONFIG_WPS */
 
        return 0;