diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-09-26 18:37:12 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-09-26 18:37:12 +0000 |
commit | 52efd7de67f21da0f1463f94b84f3a7c0280ac26 (patch) | |
tree | 331879210a87f78ee9b734bddd4f61e7c21c49cc | |
parent | 44a2f5d6c35ddb32c7172959c8fb616b803bfcbf (diff) |
2008-09-26 Joel Sherrill <joel.sherrill@OARcorp.com>
PR 1316/cpukit
* score/src/coremsgbroadcast.c: Give error when message is too large
like when sending a message. This was the documented behavior.
-rw-r--r-- | cpukit/ChangeLog | 6 | ||||
-rw-r--r-- | cpukit/score/src/coremsgbroadcast.c | 11 |
2 files changed, 11 insertions, 6 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 5ed1088979..50fc144965 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,9 @@ +2008-09-26 Joel Sherrill <joel.sherrill@OARcorp.com> + + PR 1316/cpukit + * score/src/coremsgbroadcast.c: Give error when message is too large + like when sending a message. This was the documented behavior. + 2008-09-16 Gene Smith <gene.smith@siemens.com> PR 564/cpukit diff --git a/cpukit/score/src/coremsgbroadcast.c b/cpukit/score/src/coremsgbroadcast.c index 1710e6168e..7126af73d9 100644 --- a/cpukit/score/src/coremsgbroadcast.c +++ b/cpukit/score/src/coremsgbroadcast.c @@ -66,7 +66,10 @@ CORE_message_queue_Status _CORE_message_queue_Broadcast( Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; - uint32_t constrained_size; + + if ( size > the_message_queue->maximum_message_size ) { + return CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE; + } /* * If there are pending messages, then there can't be threads @@ -92,14 +95,10 @@ CORE_message_queue_Status _CORE_message_queue_Broadcast( waitp = &the_thread->Wait; number_broadcasted += 1; - constrained_size = size; - if ( size > the_message_queue->maximum_message_size ) - constrained_size = the_message_queue->maximum_message_size; - _CORE_message_queue_Copy_buffer( buffer, waitp->return_argument, - constrained_size + size ); *(uint32_t *)the_thread->Wait.return_argument_1 = size; |