summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-09-26 17:56:15 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-09-26 17:56:15 +0000
commit01e9e461020aaea20ee333fb2f24e44cc1834690 (patch)
tree4db14e003bec8183fe8ca4fb0041e6215605d264
parent5f0f711e2da5b69af6c551af507b92ae74707823 (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/ChangeLog6
-rw-r--r--cpukit/score/src/coremsgbroadcast.c11
2 files changed, 11 insertions, 6 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog
index bbb407abc8..21ee739dbe 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;