* rtems/src/msgqcreate.c: Make packet size check consistent with
	_Message_queue_MP_Send_request_packet().
This commit is contained in:
Sebastian Huber
2011-07-19 12:19:05 +00:00
parent 267d6104e9
commit fe89930574
2 changed files with 9 additions and 1 deletions

View File

@@ -1,3 +1,8 @@
2011-07-19 Sebastian Huber <sebastian.huber@embedded-brains.de>
* rtems/src/msgqcreate.c: Make packet size check consistent with
_Message_queue_MP_Send_request_packet().
2011-07-18 Sebastian Huber <sebastian.huber@embedded-brains.de> 2011-07-18 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libnetworking/lib/ftpfs.c: Fixed reply parsing. * libnetworking/lib/ftpfs.c: Fixed reply parsing.

View File

@@ -66,6 +66,7 @@ rtems_status_code rtems_message_queue_create(
CORE_message_queue_Attributes the_msgq_attributes; CORE_message_queue_Attributes the_msgq_attributes;
#if defined(RTEMS_MULTIPROCESSING) #if defined(RTEMS_MULTIPROCESSING)
bool is_global; bool is_global;
size_t max_packet_payload_size;
#endif #endif
if ( !rtems_is_name_valid( name ) ) if ( !rtems_is_name_valid( name ) )
@@ -94,7 +95,9 @@ rtems_status_code rtems_message_queue_create(
* and then just send smaller msgs from remote (or all) nodes. * and then just send smaller msgs from remote (or all) nodes.
*/ */
if ( is_global && (_MPCI_table->maximum_packet_size < max_message_size) ) max_packet_payload_size = _MPCI_table->maximum_packet_size
- sizeof ( Message_queue_MP_Packet );
if ( is_global && max_packet_payload_size < max_message_size )
return RTEMS_INVALID_SIZE; return RTEMS_INVALID_SIZE;
#endif #endif
#endif #endif