fix valuidate header of package

This commit is contained in:
Andrei Yankovich 2020-05-09 14:40:36 +03:00
parent dfd535a878
commit 870d51616d
2 changed files with 6 additions and 4 deletions

View File

@ -56,7 +56,7 @@ protected:
commandList += i.toString() + " ";
}
result["Error"] = "Wrong command! The commands : " + commandList + " is notsupported";
result["Error"] = "Wrong command! The commands : " + commandList + " is not supported";
result["Available commands"] = stringList;
sendResuylt(result);

View File

@ -40,12 +40,14 @@ bool ServicePrivate::sendCmdResult(const QVariantMap &result) {
void ServicePrivate::handleReceve(QByteArray data) {
if (data.size() < 2) {
const Package package = Package::parsePackage(data);
if (!package.isValid()) {
QuasarAppUtils::Params::log("receive package is not valid!",
QuasarAppUtils::Warning);
return;
}
const Package package = Package::parsePackage(data);
switch (package.cmd()) {
case Command::FeaturesRequest: {