From 4f820010439cfed1c5d33705228c33048e2a5a3c Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Mon, 24 May 2021 16:05:06 -0400 Subject: [PATCH] Fix #80, exit the main loop if init fails Initialize the "RunStatus" to ERROR if initialization fails. This causes the CFE_ES_RunLoop function to return false, and the app will exit with an error status. --- fsw/src/sch_lab_app.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fsw/src/sch_lab_app.c b/fsw/src/sch_lab_app.c index 9ae5673..b76893d 100644 --- a/fsw/src/sch_lab_app.c +++ b/fsw/src/sch_lab_app.c @@ -91,6 +91,7 @@ void SCH_Lab_AppMain(void) if (Status != CFE_SUCCESS) { CFE_ES_WriteToSysLog("SCH_LAB: Error Initializing RC = 0x%08lX\n", (unsigned long)Status); + RunStatus = CFE_ES_RunStatus_APP_ERROR; } /* Loop Forever */