Fixed global conf write to skip default values for uuid and os_version

This commit is contained in:
Jouni Malinen 2008-12-18 21:29:59 +02:00
parent f086742432
commit 9be0963605
2 changed files with 3 additions and 3 deletions

View file

@ -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 */

View file

@ -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);