linux fixes
This commit is contained in:
parent
af24cc7d04
commit
16cbbb2693
@ -281,8 +281,7 @@ ReturnValue_t MessageQueue::sendToDefaultFrom(MessageQueueMessageIF* message,
|
||||
ReturnValue_t MessageQueue::sendMessageFrom(MessageQueueId_t sendTo,
|
||||
MessageQueueMessageIF* message, MessageQueueId_t sentFrom,
|
||||
bool ignoreFault) {
|
||||
return sendMessageFromMessageQueue(sendTo,message, maxMessageSize,
|
||||
sentFrom,ignoreFault);
|
||||
return sendMessageFromMessageQueue(sendTo,message, sentFrom,ignoreFault);
|
||||
|
||||
}
|
||||
|
||||
@ -297,22 +296,14 @@ bool MessageQueue::isDefaultDestinationSet() const {
|
||||
uint16_t MessageQueue::queueCounter = 0;
|
||||
|
||||
ReturnValue_t MessageQueue::sendMessageFromMessageQueue(MessageQueueId_t sendTo,
|
||||
MessageQueueMessageIF *message, size_t maxSize,
|
||||
MessageQueueId_t sentFrom, bool ignoreFault) {
|
||||
MessageQueueMessageIF *message, MessageQueueId_t sentFrom,
|
||||
bool ignoreFault) {
|
||||
if(message == nullptr) {
|
||||
sif::error << "MessageQueue::sendMessageFromMessageQueue: Message is "
|
||||
"nullptr!" << std::endl;
|
||||
return HasReturnvaluesIF::RETURN_FAILED;
|
||||
}
|
||||
|
||||
if(message->getMaximumMessageSize() > maxSize) {
|
||||
sif::error << "MessageQueue::sendMessageFromMessageQueue: Message size "
|
||||
<< message->getMaximumMessageSize() << " too large for queue"
|
||||
" with max. message size " << maxSize << "!"
|
||||
<< std::endl;
|
||||
return HasReturnvaluesIF::RETURN_FAILED;
|
||||
}
|
||||
|
||||
message->setSender(sentFrom);
|
||||
int result = mq_send(sendTo,
|
||||
reinterpret_cast<const char*>(message->getBuffer()),
|
||||
|
@ -149,8 +149,7 @@ protected:
|
||||
* \param ignoreFault If set to true, the internal software fault counter is not incremented if queue is full.
|
||||
*/
|
||||
static ReturnValue_t sendMessageFromMessageQueue(MessageQueueId_t sendTo,
|
||||
MessageQueueMessageIF* message, size_t maxSize,
|
||||
MessageQueueId_t sentFrom = NO_QUEUE,
|
||||
MessageQueueMessageIF* message, MessageQueueId_t sentFrom = NO_QUEUE,
|
||||
bool ignoreFault=false);
|
||||
private:
|
||||
/**
|
||||
|
@ -9,10 +9,10 @@ QueueFactory* QueueFactory::factoryInstance = nullptr;
|
||||
|
||||
|
||||
ReturnValue_t MessageQueueSenderIF::sendMessage(MessageQueueId_t sendTo,
|
||||
MessageQueueMessageIF* message, size_t maxSize,
|
||||
MessageQueueId_t sentFrom, bool ignoreFault) {
|
||||
MessageQueueMessageIF* message, MessageQueueId_t sentFrom,
|
||||
bool ignoreFault) {
|
||||
return MessageQueue::sendMessageFromMessageQueue(sendTo,message,
|
||||
maxSize, sentFrom,ignoreFault);
|
||||
sentFrom,ignoreFault);
|
||||
}
|
||||
|
||||
QueueFactory* QueueFactory::instance() {
|
||||
|
Loading…
Reference in New Issue
Block a user