fix in getReplyLength
This commit is contained in:
parent
532607bf8f
commit
29cf8c9009
@ -464,12 +464,21 @@ ReturnValue_t DeviceHandlerBase::insertInCommandMap(DeviceCommandId_t deviceComm
|
||||
}
|
||||
|
||||
size_t DeviceHandlerBase::getNextReplyLength(DeviceCommandId_t commandId) {
|
||||
DeviceReplyIter iter = deviceReplyMap.find(commandId);
|
||||
if (iter != deviceReplyMap.end()) {
|
||||
return iter->second.replyLen;
|
||||
} else {
|
||||
return 0;
|
||||
DeviceCommandId_t replyId = NO_COMMAND_ID;
|
||||
DeviceCommandMap::iterator command = cookieInfo.pendingCommand;
|
||||
if (command->second.useAlternativeReplyId) {
|
||||
replyId = command->second.alternativeReplyId;
|
||||
}
|
||||
else {
|
||||
replyId = commandId;
|
||||
}
|
||||
DeviceReplyIter iter = deviceReplyMap.find(replyId);
|
||||
if (iter != deviceReplyMap.end()) {
|
||||
if (iter->second.delayCycles != 0) {
|
||||
return iter->second.replyLen;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
ReturnValue_t DeviceHandlerBase::updateReplyMapEntry(DeviceCommandId_t deviceReply,
|
||||
|
Loading…
Reference in New Issue
Block a user