diff --git a/build b/build index 7c09198..c24b6ae 100644 --- a/build +++ b/build @@ -1 +1 @@ -37 \ No newline at end of file +38 \ No newline at end of file diff --git a/src/framework/ConfigurationValidator.cpp b/src/framework/ConfigurationValidator.cpp index 2154f0f..c77841b 100644 --- a/src/framework/ConfigurationValidator.cpp +++ b/src/framework/ConfigurationValidator.cpp @@ -2749,7 +2749,7 @@ static json DefaultUCentralSchema = R"( if(std::regex_match(value,host_regex)) return; throw std::invalid_argument(value + " is not a proper FQDN."); - } else if(format == "fqdn") { + } else if(format == "fqdn" || format=="uc-fqdn") { if(std::regex_match(value,host_regex)) return; throw std::invalid_argument(value + " is not a proper FQDN."); diff --git a/src/framework/UI_WebSocketClientServer.cpp b/src/framework/UI_WebSocketClientServer.cpp index 35032bc..912687a 100644 --- a/src/framework/UI_WebSocketClientServer.cpp +++ b/src/framework/UI_WebSocketClientServer.cpp @@ -119,7 +119,7 @@ namespace OpenWifi { } bool UI_WebSocketClientServer::SendToUser(const std::string &UserName, std::uint64_t id, const std::string &Payload) { - std::lock_guard G(Mutex_); + std::lock_guard G(LocalMutex_); for(const auto &Client:Clients_) { if(Client.second->UserName_ == UserName) { @@ -139,7 +139,7 @@ namespace OpenWifi { } void UI_WebSocketClientServer::SendToAll(std::uint64_t id, const std::string &Payload) { - std::lock_guard G(Mutex_); + std::lock_guard G(LocalMutex_); for(const auto &Client:Clients_) { try { @@ -189,7 +189,6 @@ namespace OpenWifi { void UI_WebSocketClientServer::OnSocketReadable([[maybe_unused]] const Poco::AutoPtr &pNf) { UI_WebSocketClientServer::ClientList::iterator Client; - std::lock_guard G(LocalMutex_); try { @@ -295,6 +294,7 @@ namespace OpenWifi { void UI_WebSocketClientServer::OnSocketShutdown([[maybe_unused]] const Poco::AutoPtr &pNf) { try { + std::lock_guard G(LocalMutex_); auto Client = Clients_.find(pNf->socket().impl()->sockfd()); if (Client == end(Clients_)) return;