-
Notifications
You must be signed in to change notification settings - Fork 227
Description
Describe the bug
The behavior of CFE_MSG_InitMsg seems to be a regression from the old 6.7 CFE_SB_InitMsg, which always set the secondary header flag regardless of the Clear/InitMsg parameter. There's always a CCSDS secondary header, so this bit should always be set.
To Reproduce
Call CFE_MSG_InitMsg with the Clear parameter set to false
Expected behavior
Secondary header flag on message is set to 1
Code snips
cFE/modules/msg/src/cfe_msg_init.c
Lines 43 to 47 in 3077251
| if (Clear) | |
| { | |
| memset(MsgPtr, 0, Size); | |
| CFE_MSG_InitDefaultHdr(MsgPtr); | |
| } |
CFE_MSG_InitDefaultHdr should always be called.
System observed on:
- SP0
- OS: VxWorks
- Versions: cFE 6.8
Additional context
Discovered when SBNg did not properly set the command code due to missing secondary header flag. This was worked around by calling CFE_SB_InitMsg w/ the InitMsg parameter set to true.
Reporter Info
John N Pham, Northrop Grumman