mirror of
https://github.com/Telecominfraproject/wlan-cloud-ucentralsec.git
synced 2025-10-29 18:02:29 +00:00
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
This commit is contained in:
@@ -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.");
|
||||
|
||||
@@ -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<Poco::Net::ReadableNotification> &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<Poco::Net::ShutdownNotification> &pNf) {
|
||||
try {
|
||||
std::lock_guard G(LocalMutex_);
|
||||
auto Client = Clients_.find(pNf->socket().impl()->sockfd());
|
||||
if (Client == end(Clients_))
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user