Do not write all zeros device_type

This is the default value if device_type is not set, so do not
write it to the wpa_supplicant configuration file when saving
updated configuration.

Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2011-11-24 22:22:16 +02:00
parent 71093e5ea9
commit a769b094d7

View file

@ -649,7 +649,8 @@ static void wpa_config_write_global(FILE *f, struct wpa_config *config)
char _buf[WPS_DEV_TYPE_BUFSIZE], *buf;
buf = wps_dev_type_bin2str(config->device_type,
_buf, sizeof(_buf));
fprintf(f, "device_type=%s\n", buf);
if (os_strcmp(buf, "0-00000000-0") != 0)
fprintf(f, "device_type=%s\n", buf);
}
if (WPA_GET_BE32(config->os_version))
fprintf(f, "os_version=%08x\n",