Fix infinite loop deviceupdate send

Deviceupdate condition never fails whenever password is changed,
thus makes the device spam with passwordchange events.
This, as a results, overflows internal buffers, which
overflows internal disk storage.

Signed-off-by: Oleksandr Mazur <oleksandr.mazur@plvision.eu>
This commit is contained in:
Oleksandr Mazur
2024-04-08 13:56:11 +03:00
parent 15b9868322
commit 24143fc5bc

View File

@@ -839,8 +839,10 @@ int main(void)
lws_service_tsi(context, 0, 0);
if (conn_successfull) {
if (password_len)
if (password_len) {
deviceupdate_send(password);
password_len = 0;
}
if (!reboot_reason_sent) {
device_rebootcause_send();
reboot_reason_sent = true;