using SDK 2.0 with latest patch.
it seems that os_bzero() in some cases can't recognize correct structure length. I have following situation:
Code: Select all
struct station_config * confSTA;
confSTA = (struct station_config *) os_zalloc(sizeof(struct station_config));
wifi_station_get_config(confSTA);
// os_bzero(confSTA->ssid); <-- if I use this one, then wifi_station_set_config() triggers wdt reset!
os_bzero(confSTA->ssid, sizeof(confSTA->ssid)); // this one is working
if (os_strlen(_userSettings->wifiSsid) > 0)
os_sprintf(confSTA->ssid, "%s", _userSettings->wifiSsid);
wifi_station_set_config(confSTA); // this function fails if os_bzero() has no length specified as a second argument
os_free(confSTA);
Is there any rule of thumb when os_bzero() is safe to use or is in this case bug of wifi_station_set_config()?
Rdds,
Frenk