If the priority range of a proto / flatbuffer connection is not in the valid range (100 - 199) we will send an error message to the client as well as in the console output

Signed-off-by: Paulchen-Panther <Paulchen-Panter@protonmail.com>
This commit is contained in:
Paulchen-Panther
2019-08-12 19:06:11 +02:00
parent 0f839f670e
commit a8a6113517
2 changed files with 5 additions and 3 deletions

View File

@@ -123,7 +123,7 @@ void FlatBufferClient::handleRegisterCommand(const hyperionnet::Register *regReq
{
if (regReq->priority() < 100 || regReq->priority() >= 200)
{
// Warning(_log, "Register request from client %s contains invalid priority %d. Valid rage is between 100 and 199.", QSTRING_CSTR(_clientAddress), regReq->priority());
Error(_log, "Register request from client %s contains invalid priority %d. Valid priority for Flatbuffer connections is between 100 and 199.", QSTRING_CSTR(_clientAddress), regReq->priority());
sendErrorReply("The priority " + std::to_string(regReq->priority()) + " is not in the priority range between 100 and 199.");
return;
}