mirror of
https://github.com/QuasarApp/Patronum.git
synced 2025-04-28 08:34:32 +00:00
fix valuidate header of package
This commit is contained in:
parent
dfd535a878
commit
870d51616d
@ -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);
|
||||
|
@ -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: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user