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

Subscribes to MsgId 0x0 256-actual_msgids times #50

Closed
skliper opened this issue Jul 23, 2020 · 0 comments · Fixed by #51 or #53
Closed

Subscribes to MsgId 0x0 256-actual_msgids times #50

skliper opened this issue Jul 23, 2020 · 0 comments · Fixed by #51 or #53
Labels
bug Something isn't working
Milestone

Comments

@skliper
Copy link
Contributor

skliper commented Jul 23, 2020

Describe the bug
Loops through the entire table of subscriptions and subscribes, any unset values in the table are 0 so subscribes to MsgId 0 over 200 times.

Shows up multiple times on startup:
EVS Port1 42/1/CFE_SB 7: Duplicate Subscription,MsgId 0x0 on TO_LAB_TLM_PIPE pipe,app TO_LAB_APP

To Reproduce
Any normal run.

Expected behavior
Only subscribe to requested message IDs.

Code snips

to_lab/fsw/src/to_lab_app.c

Lines 227 to 238 in 5adf513

/* Subscriptions for TLM pipe*/
for (i = 0; (i < (sizeof(TO_LAB_Subs->Subs) / sizeof(TO_LAB_Subs->Subs[0]))); i++)
{
if (CFE_SB_IsValidMsgId(TO_LAB_Subs->Subs[i].Stream))
status = CFE_SB_SubscribeEx(TO_LAB_Subs->Subs[i].Stream, TO_LAB_Global.Tlm_pipe, TO_LAB_Subs->Subs[i].Flags,
TO_LAB_Subs->Subs[i].BufLimit);
if (status != CFE_SUCCESS)
CFE_EVS_SendEvent(TO_SUBSCRIBE_ERR_EID, CFE_EVS_EventType_ERROR,
"L%d TO Can't subscribe to stream 0x%x status %i", __LINE__,
(unsigned int)CFE_SB_MsgIdToValue(TO_LAB_Subs->Subs[i].Stream), (int)status);
}

System observed on:

  • Hardware: cFS Dev 3
  • OS: Ubuntu 18.04
  • Versions: current bundle

Additional context
Likely due to subscription table conversion to a cFS table.

Reporter Info
Jacob Hageman - NASA/GSFC

skliper added a commit to skliper/to_lab that referenced this issue Jul 23, 2020
skliper added a commit to skliper/to_lab that referenced this issue Jul 29, 2020
astrogeco added a commit that referenced this issue Aug 4, 2020
Fix #50, Mark end of valid MsgId subscriptions
astrogeco pushed a commit to astrogeco/to_lab that referenced this issue Aug 4, 2020
astrogeco pushed a commit to astrogeco/to_lab that referenced this issue Aug 4, 2020
@astrogeco astrogeco added this to the 2.4.0 milestone Oct 1, 2020
@astrogeco astrogeco added the bug Something isn't working label Oct 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants