Import bugfix in MessageQueue.cpp
lastPartner is only assigned if receiveMessage is successful
This commit is contained in:
parent
a8247eb2f0
commit
d2325e60b6
@ -38,7 +38,9 @@ ReturnValue_t MessageQueue::reply(MessageQueueMessage* message) {
|
||||
ReturnValue_t MessageQueue::receiveMessage(MessageQueueMessage* message,
|
||||
MessageQueueId_t* receivedFrom) {
|
||||
ReturnValue_t status = this->receiveMessage(message);
|
||||
*receivedFrom = this->lastPartner;
|
||||
if(status == HasReturnvaluesIF::RETURN_OK) {
|
||||
*receivedFrom = this->lastPartner;
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
|
@ -48,6 +48,7 @@ ReturnValue_t PUSDistributor::registerService(AcceptsTelecommandsIF* service) {
|
||||
ReturnValue_t returnValue = RETURN_OK;
|
||||
bool errorCode = true;
|
||||
uint16_t serviceId = service->getIdentifier();
|
||||
//info << "Service ID: " << (int)serviceId << std::endl;
|
||||
MessageQueueId_t queue = service->getRequestQueue();
|
||||
errorCode = this->queueMap.insert(
|
||||
std::pair<uint32_t, MessageQueueId_t>(serviceId, queue)).second;
|
||||
|
Loading…
Reference in New Issue
Block a user