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 #285, flatten logic in CF_CFDP_InitEngine() to fix bug #286

Merged
merged 1 commit into from
Jul 21, 2022

Conversation

havencarlson
Copy link
Contributor

Checklist (Please check before submitting)

Describe the contribution
Fix #285, fixed error in code where semaphore name being blank would skip to the end of CF_CFDP_InitEngine()

Testing performed
Ran unit tests

Expected behavior changes
If the semaphore name is blank, continue with function instead of exiting.

System(s) tested on

  • OS: Ubuntu 18.04

Contributor Info - All information REQUIRED for consideration of pull request
Haven Carlson - NASA

@havencarlson havencarlson changed the title fix #285, flatten logic in CF_CFDP_InitEngine() to fix bug Fix #285, flatten logic in CF_CFDP_InitEngine() to fix bug Jul 21, 2022
CF_AppData.config_table->chan[i].pipe_depth_input);
if (ret != CFE_SUCCESS)
{
CFE_EVS_SendEvent(CF_EID_ERR_INIT_SUB, CFE_EVS_EventType_ERROR,

Check warning

Code scanning / CodeQL-coding-standard

Unchecked return value

The return value of non-void function [CFE_EVS_SendEvent](1) is not checked.
CFE_EVS_SendEvent(CF_EID_ERR_INIT_SUB, CFE_EVS_EventType_ERROR,
"CF: failed to subscribe to MID 0x%lx, returned 0x%08lx",
(unsigned long)CF_AppData.config_table->chan[i].mid_input, (unsigned long)ret);
CFE_EVS_SendEvent(CF_EID_ERR_INIT_SEM, CFE_EVS_EventType_ERROR,

Check warning

Code scanning / CodeQL-coding-standard

Unchecked return value

The return value of non-void function [CFE_EVS_SendEvent](1) is not checked.
}
for (j = 0; j < CF_NUM_TRANSACTIONS_PER_CHANNEL; ++j, ++t)
{
int k;

Check notice

Code scanning / CodeQL-coding-standard

Use of basic integral type

k uses the basic integral type int rather than a typedef with size and signedness.
t->chan_num = i;
CF_FreeTransaction(t);

for (k = 0; k < CF_Direction_NUM; ++k, ++c)

Check notice

Code scanning / CodeQL-coding-standard

AV Rule 168

AV Rule 168: The comma operator shall not be used.
CF_CList_InsertBack_Ex(&CF_AppData.engine.channels[i], CF_QueueIdx_HIST_FREE, &h->cl_node);
}
}
for (j = 0; j < CF_NUM_TRANSACTIONS_PER_CHANNEL; ++j, ++t)

Check notice

Code scanning / CodeQL-coding-standard

AV Rule 168

AV Rule 168: The comma operator shall not be used.
@dzbaker
Copy link
Contributor

dzbaker commented Jul 21, 2022

21 July 2022: Merging as a hotfix, will review in next CCB (7/27).

@dzbaker dzbaker merged commit 0774746 into nasa:main Jul 21, 2022
@skliper
Copy link
Contributor

skliper commented Aug 11, 2022

@dzbaker - did we ever discuss this one in a CCB? If not we should include so we can add the approved label.

@skliper skliper added this to the Draco milestone Aug 11, 2022
@dzbaker dzbaker added CCB:Ready Ready for discussion at the Configuration Control Board (CCB) CCB:Approved and removed CCB:Ready Ready for discussion at the Configuration Control Board (CCB) labels Aug 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

goto refactor broke engine initialization, blank sem_name is not an error
5 participants