Skip to content

CFE_SB_ValidateChecksum implementation does not match description #733

@skliper

Description

@skliper

Describe the bug
CFE_SB_ValidateChecksum claims it returns true if not supported:

** \par Assumptions, External Events, and Notes:
** - If the underlying implementation of software bus messages does not
** include a checksum field, then this routine will always return \c true.

but also claims it returns false:

** \return Boolean checksum result
** \retval true The checksum field in the packet is valid.
** \retval false The checksum field in the packet is not valid or the message type is wrong.

and then implements a false return:

/* if msg type is telemetry or there is no secondary hdr... */
if((CCSDS_RD_TYPE(MsgPtr->Hdr) == CCSDS_TLM)||(CCSDS_RD_SHDR(MsgPtr->Hdr) == 0)){
return false;
}/* end if */

To Reproduce
Read the code.

Expected behavior
Consistency

Code snips
See above

System observed on:
N/A

Additional context
None

Reporter Info
Jacob Hageman - NASA/GSFC

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions