super evil bug
This commit is contained in:
parent
43ddb44573
commit
80aab5f461
@ -190,13 +190,14 @@ ReturnValue_t MessageQueue::receiveMessage(MessageQueueMessageIF* message) {
|
|||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return HasReturnvaluesIF::RETURN_FAILED;
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return HasReturnvaluesIF::RETURN_OK;
|
||||||
}else if(status==0){
|
}
|
||||||
|
else if(status==0) {
|
||||||
//Success but no message received
|
//Success but no message received
|
||||||
return MessageQueueIF::EMPTY;
|
return MessageQueueIF::EMPTY;
|
||||||
} else {
|
} else {
|
||||||
//No message was received. Keep lastPartner anyway, I might send
|
//No message was received. Keep lastPartner anyway, I might send
|
||||||
//something later. But still, delete packet content.
|
//something later. But still, delete packet content.
|
||||||
memset(message->getData(), 0, message->getMaximumMessageSize());
|
memset(message->getBuffer(), 0, message->getMaximumMessageSize());
|
||||||
switch(errno){
|
switch(errno){
|
||||||
case EAGAIN:
|
case EAGAIN:
|
||||||
//O_NONBLOCK or MQ_NONBLOCK was set and there are no messages
|
//O_NONBLOCK or MQ_NONBLOCK was set and there are no messages
|
||||||
|
Loading…
Reference in New Issue
Block a user