added a check that S1 + messageInitiationSize should not be equal to S2 + messageResponseSize (#754)

This commit is contained in:
Nethius 2024-04-17 17:28:47 +07:00 committed by GitHub
parent af90065d2e
commit 98e6358fd3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 42 additions and 5 deletions

View file

@ -129,6 +129,16 @@ QJsonObject AwgConfigModel::getConfig()
return m_fullConfig;
}
bool AwgConfigModel::isHeadersEqual(const QString &h1, const QString &h2, const QString &h3, const QString &h4)
{
return (h1 == h2) || (h1 == h3) || (h1 == h4) || (h2 == h3) || (h2 == h4) || (h3 == h4);
}
bool AwgConfigModel::isPacketSizeEqual(const int s1, const int s2)
{
return (AwgConstant::messageInitiationSize + s1 == AwgConstant::messageResponseSize + s2);
}
QHash<int, QByteArray> AwgConfigModel::roleNames() const
{
QHash<int, QByteArray> roles;