-
Notifications
You must be signed in to change notification settings - Fork 30
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 #51, remove mid #59
Conversation
b3fbe1a
to
7dff414
Compare
/* */ | ||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ | ||
|
||
void DS_CmdRemoveMID(const CFE_SB_Buffer_t *BufPtr) |
Check notice
Code scanning / CodeQL-coding-standard
Long function without assertion
/* */ | ||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ | ||
|
||
void DS_CmdRemoveMID(const CFE_SB_Buffer_t *BufPtr) |
Check notice
Code scanning / CodeQL-coding-standard
Function too long
13484db
to
0ce3175
Compare
pPacketEntry->MessageID = CFE_SB_ValueToMsgId(0); | ||
|
||
/* Create new hash table as well */ | ||
DS_TableCreateHash(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jphickey Would you please let me know your thoughts on using DS_TableCreateHash()
here to address the DS Hash Table in removing a message ID, instead of discretely removing a link? As part of this PR, some work went towards doing the latter, but the former seemed easier. This is a concern since DS_CmdAddMID
also adds to the Hash Table:
Lines 1415 to 1416 in 49d6a09
/* Add the message ID to the hash table as well */ | |
HashTableIndex = DS_TableAddMsgID(DS_AddMidCmd->MessageID, FilterTableIndex); |
CCB 27 October 2022: Approved pending review and workflow failure resolution. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just one minor comment
fsw/src/ds_cmds.c
Outdated
*/ | ||
pPacketEntry = &DS_AppData.FilterTblPtr->Packet[FilterTableIndex]; | ||
|
||
pPacketEntry->MessageID = CFE_SB_ValueToMsgId(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only comment here - it would be preferable to use the defined CFE_SB_INVALID_MSG_ID
constant here
4323e70
to
f9c2910
Compare
Regarding the "Build and Run / Build and run with startup msg verification / Build and run app, confirm startup message" failing check, it seems to fail when I run the latest merged commit (commit SHA: 49d6a09) on DS with the addition of a comment change on top of it: https://github.com/chillfig/DS/actions/runs/3363700817/jobs/5577190604#logs. The failing "Unit Test and Coverage" check is failing as expected due to new code being added. New unit tests will be created to resolve that check. |
Checklist (Please check before submitting)
Describe the contribution
Testing performed
Steps taken to test the contribution:
OS_printf
.OS_printf
.Expected behavior changes
Allows users to remove message IDs from the filter table.
System(s) tested on
Additional context
N/A
Third party code
If included, identify any third party code and provide text file of license
Contributor Info - All information REQUIRED for consideration of pull request
Justin Figueroa, Vantage Systems