Browse Source

Fixed crash due to uninitialized variable (#116)

* Fixed crash due to uninitialized variable "Fatal exception 9(LoadStoreAlignmentCause)"
master
kasedy 4 years ago
committed by GitHub
parent
commit
4e6823ceec
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      lib/framework/APSettingsService.cpp
  2. 3
      lib/framework/OTASettingsService.cpp

4
lib/framework/APSettingsService.cpp

@ -7,7 +7,9 @@ APSettingsService::APSettingsService(AsyncWebServer* server, FS* fs, SecurityMan
server,
AP_SETTINGS_SERVICE_PATH,
securityManager),
_fsPersistence(APSettings::serialize, APSettings::deserialize, this, fs, AP_SETTINGS_FILE) {
_fsPersistence(APSettings::serialize, APSettings::deserialize, this, fs, AP_SETTINGS_FILE),
_lastManaged(0),
_dnsServer(nullptr) {
addUpdateHandler([&](String originId) { reconfigureAP(); }, false);
}

3
lib/framework/OTASettingsService.cpp

@ -7,7 +7,8 @@ OTASettingsService::OTASettingsService(AsyncWebServer* server, FS* fs, SecurityM
server,
OTA_SETTINGS_SERVICE_PATH,
securityManager),
_fsPersistence(OTASettings::serialize, OTASettings::deserialize, this, fs, OTA_SETTINGS_FILE) {
_fsPersistence(OTASettings::serialize, OTASettings::deserialize, this, fs, OTA_SETTINGS_FILE),
_arduinoOTA(nullptr) {
#ifdef ESP32
WiFi.onEvent(std::bind(&OTASettingsService::onStationModeGotIP, this, std::placeholders::_1, std::placeholders::_2),
WiFiEvent_t::SYSTEM_EVENT_STA_GOT_IP);

Loading…
Cancel
Save