Skip to content

Fix #285, flatten logic in CF_CFDP_InitEngine() to fix bug#286

Merged
dzbaker merged 1 commit intonasa:mainfrom
havencarlson:fix#285-goto
Jul 21, 2022
Merged

Fix #285, flatten logic in CF_CFDP_InitEngine() to fix bug#286
dzbaker merged 1 commit intonasa:mainfrom
havencarlson:fix#285-goto

Conversation

@havencarlson
Copy link
Copy Markdown
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
Comment thread fsw/src/cf_cfdp.c
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.
Comment thread fsw/src/cf_cfdp.c
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.
Comment thread fsw/src/cf_cfdp.c
}
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.
Comment thread fsw/src/cf_cfdp.c
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.
Comment thread fsw/src/cf_cfdp.c
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
Copy Markdown
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
Copy Markdown

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

6 participants