From 9be0963605a9fae71e9ef2ba0ccdab3b638be412 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Thu, 18 Dec 2008 21:29:59 +0200 Subject: Fixed global conf write to skip default values for uuid and os_version --- wpa_supplicant/config_file.c | 4 ++-- wpa_supplicant/config_winreg.c | 2 +- 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); -- cgit v1.1