diff options
| author | Haithem Rahmani <[email protected]> | 2025-03-21 09:28:58 +0100 |
|---|---|---|
| committer | Haithem Rahmani <[email protected]> | 2025-04-02 16:51:36 +0100 |
| commit | 87e511034647af30cf96be09149cbaf707be63a2 (patch) | |
| tree | a3bf569b0c006f5b158bebbc8209639cf0d2e8dd /common/src/txe_queue_create.c | |
| parent | 7ad78c40e9702917264a9b722890110fdb909ebc (diff) | |
Make queue max message size configurable
Summary
-------
This commit fixes the issue #424
Details
--------
- Add a the configuration option TX_QUEUE_MESSAGE_MAX_SIZE in the tx_api.h with default value
set to TX_ULONG_16 to keep backword compatibility.
- Update the txe_queue_create() to check on TX_QUEUE_MESSAGE_MAX_SIZE rather than TX_ULONG_16
as max message size.
- Add a new unitary test to cover the new change.
Diffstat (limited to 'common/src/txe_queue_create.c')
| -rw-r--r-- | common/src/txe_queue_create.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/src/txe_queue_create.c b/common/src/txe_queue_create.c index 68d3540a..2d91cc9f 100644 --- a/common/src/txe_queue_create.c +++ b/common/src/txe_queue_create.c @@ -178,8 +178,8 @@ TX_THREAD *thread_ptr; status = TX_SIZE_ERROR; } - /* Check for an invalid message size - greater than 16. */ - else if (message_size > TX_16_ULONG) + /* Check for an invalid message size - greater than TX_QUEUE_MESSAGE_MAX_SIZE 16 by default. */ + else if (message_size > TX_QUEUE_MESSAGE_MAX_SIZE) { /* Invalid message size specified. */ |
