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 #187, Zero-out global data during init + set RunStatus to APP_ERROR if init fails #188

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion fsw/src/to_lab_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ void TO_LAB_AppMain(void)

if (status != CFE_SUCCESS)
{
return;
/*
** Set request to terminate main loop...
*/
RunStatus = CFE_ES_RunStatus_APP_ERROR;
}

/*
Expand Down Expand Up @@ -105,6 +108,9 @@ CFE_Status_t TO_LAB_init(void)
void * TblPtr;
TO_LAB_Sub_t *SubEntry;

/* Zero out the global data structure */
memset(&TO_LAB_Global, 0, sizeof(TO_LAB_Global));

TO_LAB_Global.downlink_on = false;
PipeDepth = TO_LAB_CMD_PIPE_DEPTH;
strcpy(PipeName, "TO_LAB_CMD_PIPE");
Expand Down
Loading