aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2008-12-18 19:29:59 (GMT)
committerJouni Malinen <j@w1.fi>2008-12-18 19:29:59 (GMT)
commit9be0963605a9fae71e9ef2ba0ccdab3b638be412 (patch)
treef68c1aace43c3d6b674929e134bc52ab6cce7e54 /wpa_supplicant
parentf086742432f2796a1a1c12d95b3e13d643e15061 (diff)
downloadhostap-06-9be0963605a9fae71e9ef2ba0ccdab3b638be412.zip
hostap-06-9be0963605a9fae71e9ef2ba0ccdab3b638be412.tar.gz
hostap-06-9be0963605a9fae71e9ef2ba0ccdab3b638be412.tar.bz2
Fixed global conf write to skip default values for uuid and os_version
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/config_file.c4
-rw-r--r--wpa_supplicant/config_winreg.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/wpa_supplicant/config_file.c b/wpa_supplicant/config_file.c
index 0963f7e..f544a56 100644
--- a/wpa_supplicant/config_file.c
+++ b/wpa_supplicant/config_file.c
@@ -861,7 +861,7 @@ static void wpa_config_write_global(FILE *f, struct wpa_config *config)
if (config->update_config)
fprintf(f, "update_config=%d\n", config->update_config);
#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));
fprintf(f, "uuid=%s\n", buf);
@@ -878,7 +878,7 @@ static void wpa_config_write_global(FILE *f, struct wpa_config *config)
fprintf(f, "serial_number=%s\n", config->serial_number);
if (config->device_type)
fprintf(f, "device_type=%s\n", config->device_type);
- if (config->os_version)
+ if (WPA_GET_BE32(config->os_version))
fprintf(f, "os_version=%08x\n",
WPA_GET_BE32(config->os_version));
#endif /* CONFIG_WPS */
diff --git a/wpa_supplicant/config_winreg.c b/wpa_supplicant/config_winreg.c
index 48ce603..e16630d 100644
--- a/wpa_supplicant/config_winreg.c
+++ b/wpa_supplicant/config_winreg.c
@@ -551,7 +551,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);