Skip to content

CFE_MSG_InitMsg does not always set secondary header bit #973

@johnphamngc

Description

@johnphamngc

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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions