diff --git a/src/mesh/NodeDB.cpp b/src/mesh/NodeDB.cpp index a1e0bfb09..ce84e8c9f 100644 --- a/src/mesh/NodeDB.cpp +++ b/src/mesh/NodeDB.cpp @@ -1675,11 +1675,10 @@ bool NodeDB::restorePreferences(meshtastic_AdminMessage_BackupLocation location, } success = saveToDisk(restoreWhat); - if (!success) { - LOG_ERROR("Failed to save restored preferences to flash"); + if (success) { + LOG_INFO("Restored preferences from backup"); } else { - LOG_INFO("Restored preferences from backup... Rebooting"); - rebootAtMsec = millis() + 1000; + LOG_ERROR("Failed to save restored preferences to flash"); } } else { LOG_ERROR("Failed to restore preferences from backup file"); diff --git a/src/modules/AdminModule.cpp b/src/modules/AdminModule.cpp index 8f18fb721..d31248de4 100644 --- a/src/modules/AdminModule.cpp +++ b/src/modules/AdminModule.cpp @@ -387,7 +387,9 @@ bool AdminModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshta if (nodeDB->restorePreferences(r->backup_preferences, SEGMENT_DEVICESTATE | SEGMENT_CONFIG | SEGMENT_MODULECONFIG | SEGMENT_CHANNELS)) { myReply = allocErrorResponse(meshtastic_Routing_Error_NONE, &mp); + LOG_DEBUG("Rebooting after successful restore of preferences"); disableBluetooth(); + reboot(1000); } else { myReply = allocErrorResponse(meshtastic_Routing_Error_BAD_REQUEST, &mp); }