Skip to content

Reject duplicate message ID in filter table validation #106

@skliper

Description

@skliper

Checklist (Please check before submitting)

  • I reviewed the Contributing Guide.
  • I reviewed the README file to see if the feature is in the major future work.
  • I performed a cursory search to see if the feature request is relevant, not redundant, nor in conflict with other tickets.

Is your feature request related to a problem? Please describe.
DS doesn't reject duplicate message ID entry in the filter table. Although SB does report the duplicate:

66/1/CFE_SB 7: Duplicate Subscription,MsgId 0x901 on DS_CMD_PIPE pipe,app DS

When DS does the lookup it only returns the first hit:

DS/fsw/src/ds_table.c

Lines 1120 to 1135 in 6418164

/* NULL when list is empty or end of list */
while (HashLink != (DS_HashLink_t *)NULL)
{
/* Compare this linked list entry for matching MessageID */
if (CFE_SB_MsgIdToValue(FilterPackets[HashLink->Index].MessageID) == CFE_SB_MsgIdToValue(MessageID))
{
/* Stop the search - we found it */
FilterTableIndex = HashLink->Index;
break;
}
/* Max of 8 links per design */
HashLink = HashLink->Next;
}
return FilterTableIndex;

Describe the solution you'd like
Since duplicate message ID in filter table isn't supported, should clearly reject an attempt by the user to do so. I suggest failing filter table validation.

Describe alternatives you've considered
None

Additional context
Can send to multiple destinations from a single entry, and supports changing those destinations via command so no additional functionality needed there. Just should reject multiple filter table entries with the same MID (user error).

Requester Info
Jacob Hageman - NASA/GSFC

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions