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

Mark empty slots with invalid msgid, and don't try to unsubscribe all on them #72

Open
skliper opened this issue Dec 14, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@skliper
Copy link
Contributor

skliper commented Dec 14, 2020

Is your feature request related to a problem? Please describe.
Unsubscribe all currently loops through the entire table unsubscribing, including the MSGID 0x0's (which is a valid MSGID). This causes numerous errors:

EVS Port1 66/1/CFE_SB 12: Unsubscribe Err:No subs for Msg 0x0 on TO_LAB_TLM_PIPE,app TO_LAB_APP

Describe the solution you'd like
Mark as invalid, skip invalid

Describe alternatives you've considered
Keep a count

Additional context
Observed in fixing #71

Requester Info
Jacob Hageman - NASA/GSFC

@thnkslprpt
Copy link
Contributor

@skliper could we just change the if condition before the attempt to unsubscribe:

if (CFE_SB_IsValidMsgId(SubEntry->Stream))

to something like this?

if ((CFE_SB_IsValidMsgId(SubEntry->Stream)) && (CFE_SB_MsgIdToValue(SubEntry->Stream) != 0))

@skliper
Copy link
Contributor Author

skliper commented Jan 16, 2024

This issue is likely obsolete, since CFE_SB_INVALID_MSG_ID is now 0:
https://github.com/nasa/cFE/blob/7f5ebcd15032fe31e7ef0e5ff4ef624d51d66e16/modules/core_api/fsw/inc/cfe_sb_api_typedefs.h#L113

I suggest sending the to_lab remove all packets command and see if it now behaves as expected (shouldn't report errors on unsubscribing from 0x0).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants