Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #1667, CFE_SB_MsgHdrSize returns size_t #1674

Merged
merged 2 commits into from
Jul 20, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/core_api/fsw/inc/cfe_sb.h
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ void *CFE_SB_GetUserData(CFE_MSG_Message_t *MsgPtr);
** \param[in] MsgPtr A pointer to the buffer that contains the software bus message.
** This must point to the first byte of the message header.
**
** \return The size (in bytes) of the user data in the software bus message.
** \return The size (in bytes) of the user data in the software bus message, returns 0 if *MsgPtr is Null
**/
size_t CFE_SB_GetUserDataLength(const CFE_MSG_Message_t *MsgPtr);

Expand Down
2 changes: 1 addition & 1 deletion modules/sb/fsw/src/cfe_sb_priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ CFE_SB_DestinationD_t *CFE_SB_GetDestPtr(CFE_SBR_RouteId_t RouteId, CFE_SB_PipeI
** if SB messages are implemented as CCSDS packets, the size of the header
** is different for command vs. telemetry packets.
**
** \returns Estimated number of bytes in the message header for the given message
** \returns Estimated number of bytes in the message header for the given message, returns 0 if *MsgPtr is Null
**/
size_t CFE_SB_MsgHdrSize(const CFE_MSG_Message_t *MsgPtr);

Expand Down
4 changes: 2 additions & 2 deletions modules/sb/fsw/src/cfe_sb_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ size_t CFE_SB_MsgHdrSize(const CFE_MSG_Message_t *MsgPtr)

if (MsgPtr == NULL)
{
return CFE_SB_BAD_ARGUMENT;
return size;
}

CFE_MSG_GetHasSecondaryHeader(MsgPtr, &hassechdr);
Expand Down Expand Up @@ -117,7 +117,7 @@ size_t CFE_SB_GetUserDataLength(const CFE_MSG_Message_t *MsgPtr)

if (MsgPtr == NULL)
{
return CFE_SB_BAD_ARGUMENT;
return TotalMsgSize;
}

CFE_MSG_GetSize(MsgPtr, &TotalMsgSize);
Expand Down