This commit is contained in:
parent
3c23ede9dd
commit
6d53a38f9f
@ -1994,7 +1994,8 @@ ReturnValue_t PlocSupervisorHandler::extractUpdateCommand(const uint8_t* command
|
|||||||
supv::UpdateParams& params) {
|
supv::UpdateParams& params) {
|
||||||
size_t remSize = size;
|
size_t remSize = size;
|
||||||
if (size > (config::MAX_FILENAME_SIZE + config::MAX_PATH_SIZE + sizeof(params.memId)) +
|
if (size > (config::MAX_FILENAME_SIZE + config::MAX_PATH_SIZE + sizeof(params.memId)) +
|
||||||
sizeof(params.startAddr) + sizeof(params.bytesWritten) + sizeof(params.seqCount)) {
|
sizeof(params.startAddr) + sizeof(params.bytesWritten) + sizeof(params.seqCount) +
|
||||||
|
sizeof(uint8_t)) {
|
||||||
sif::warning << "PlocSupervisorHandler::extractUpdateCommand: Data size too big" << std::endl;
|
sif::warning << "PlocSupervisorHandler::extractUpdateCommand: Data size too big" << std::endl;
|
||||||
return SupvReturnValuesIF::INVALID_LENGTH;
|
return SupvReturnValuesIF::INVALID_LENGTH;
|
||||||
}
|
}
|
||||||
@ -2016,14 +2017,17 @@ ReturnValue_t PlocSupervisorHandler::extractUpdateCommand(const uint8_t* command
|
|||||||
<< std::endl;
|
<< std::endl;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
result = SerializeAdapter::deSerialize(¶ms.deleteMemory, &commandData, &remSize,
|
uint8_t delMemRaw = 0;
|
||||||
|
result = SerializeAdapter::deSerialize(&delMemRaw, &commandData, &remSize,
|
||||||
SerializeIF::Endianness::BIG);
|
SerializeIF::Endianness::BIG);
|
||||||
if (result != RETURN_OK) {
|
if (result != RETURN_OK) {
|
||||||
sif::warning
|
sif::warning
|
||||||
<< "PlocSupervisorHandler::extractUpdateCommand: Failed to deserialize whether to delete "
|
<< "PlocSupervisorHandler::extractUpdateCommand: Failed to deserialize whether to delete "
|
||||||
"memory" << std::endl;
|
"memory"
|
||||||
|
<< std::endl;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
params.deleteMemory = delMemRaw;
|
||||||
return RETURN_OK;
|
return RETURN_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -253,7 +253,7 @@ ReturnValue_t PlocSupvHelper::executeUpdate() {
|
|||||||
if (result != RETURN_OK) {
|
if (result != RETURN_OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
if(update.deleteMemory) {
|
if (update.deleteMemory) {
|
||||||
sif::info << "PLOC SUPV Update MPSoC: Erasing Memory" << std::endl;
|
sif::info << "PLOC SUPV Update MPSoC: Erasing Memory" << std::endl;
|
||||||
result = eraseMemory();
|
result = eraseMemory();
|
||||||
if (result != RETURN_OK) {
|
if (result != RETURN_OK) {
|
||||||
|
Loading…
Reference in New Issue
Block a user