ASTP 1.1.0 Merge Development in Master #441

Merged
gaisser merged 265 commits from development into master 2021-06-29 14:11:46 +02:00
1 changed files with 13 additions and 2 deletions
Showing only changes of commit 05edb7a00c - Show all commits

View File

@ -591,9 +591,20 @@ void DeviceHandlerBase::replyToReply(const DeviceCommandId_t command, DeviceRepl
//Is most likely periodic reply. Silent return.
return;
}
// Check if more replies are expected. If so, do nothing.
DeviceCommandInfo* info = &replyInfo.command->second;
if (--info->expectedReplies == 0) {
if (info == nullptr){
printWarningOrError(sif::OutputTypes::OUT_ERROR,
"replyToReply", HasReturnvaluesIF::RETURN_FAILED,
"Command pointer not found");
return;
}
if (info->expectedReplies > 0){
// Check before to avoid underflow
info->expectedReplies--;
}
// Check if more replies are expected. If so, do nothing.
if (info->expectedReplies == 0) {
// Check if it was transition or internal command.
// Don't send any replies in that case.
if (info->sendReplyTo != NO_COMMANDER) {