отклонение запроса на Управление версиями

This commit is contained in:
2026-01-22 15:18:40 +03:00
parent 2522bc6af5
commit 5415afe264
12 changed files with 156 additions and 16 deletions

View File

@@ -149,16 +149,50 @@ void MultiThreadServer::slotDisconnectClient(QString peerAddress, QString peerPo
bool MultiThreadServer::slot_BlockAutorization(bool block, QString whoFullName, QString type)
{
bool res = true;
bool res = false;
bool blockRes = false;
QString key = whoFullName + " [type:" + type + "]";
QString strTypes = "";
if(block)
{
this->blockAutorization();
blockersMap.insert(key, type);
blockRes = true;
if(whoFullName == "SERVER")
{
this->blockAutorization();
blockersMap.insert(key, type);
blockRes = true;
res = true;
}
else
{
bool flExist = false;
foreach(QString keyLocal, blockersMap.keys())
{
if(blockersMap[keyLocal] == type)
{
flExist = true;
break;
}
}
if(!flExist)
{
this->blockAutorization();
blockersMap.insert(key, type);
blockRes = true;
res = true;
}
else
{
if(!blockersMap.count())
blockRes = false;
else
blockRes = true;
res = false;
}
}
}
else
{
@@ -170,6 +204,8 @@ bool MultiThreadServer::slot_BlockAutorization(bool block, QString whoFullName,
}
else
blockRes = true;
res = true;
}
if(res)