diff --git a/osal/linux/MessageQueue.cpp b/osal/linux/MessageQueue.cpp index c4b24a13..b11b9b6f 100644 --- a/osal/linux/MessageQueue.cpp +++ b/osal/linux/MessageQueue.cpp @@ -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(message->getBuffer()), diff --git a/osal/linux/MessageQueue.h b/osal/linux/MessageQueue.h index 22725d18..8e3a5191 100644 --- a/osal/linux/MessageQueue.h +++ b/osal/linux/MessageQueue.h @@ -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: /** diff --git a/osal/linux/QueueFactory.cpp b/osal/linux/QueueFactory.cpp index 95264a42..8bd9d52c 100644 --- a/osal/linux/QueueFactory.cpp +++ b/osal/linux/QueueFactory.cpp @@ -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() {