mirror of
https://github.com/Telecominfraproject/wlan-cloud-ucentralgw.git
synced 2025-12-24 14:27:00 +00:00
27 lines
725 B
C++
27 lines
725 B
C++
//
|
|
// Created by stephane bourque on 2022-07-26.
|
|
//
|
|
|
|
#include "AP_WS_Connection.h"
|
|
#include "StorageService.h"
|
|
|
|
#include "fmt/format.h"
|
|
|
|
namespace OpenWifi {
|
|
|
|
void AP_WS_Connection::Process_deviceupdate(Poco::JSON::Object::Ptr ParamsObj, std::string &Serial) {
|
|
if (!State_.Connected) {
|
|
poco_warning(Logger_, fmt::format(
|
|
"INVALID-PROTOCOL({}): Device '{}' is not following protocol", CId_, CN_));
|
|
Errors_++;
|
|
return;
|
|
}
|
|
if (ParamsObj->has("currentPassword")) {
|
|
auto Password = ParamsObj->get("currentPassword").toString();
|
|
|
|
StorageService()->SetDevicePassword(Serial, Password);
|
|
poco_trace(Logger_, fmt::format("DEVICEUPDATE({}): Device is updating its login password.", Serial));
|
|
}
|
|
}
|
|
|
|
} |