From 53caa1f6820af26efd1aa60de7e4a03abcc67446 Mon Sep 17 00:00:00 2001 From: Avi Weiss Date: Wed, 5 Apr 2023 11:27:47 +1000 Subject: [PATCH] Fix #147, Add check for failure of `CFE_EVS_Register()` during initialization --- fsw/src/to_lab_app.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/fsw/src/to_lab_app.c b/fsw/src/to_lab_app.c index 17e2660..b54f192 100644 --- a/fsw/src/to_lab_app.c +++ b/fsw/src/to_lab_app.c @@ -146,7 +146,13 @@ int32 TO_LAB_init(void) /* ** Register with EVS */ - CFE_EVS_Register(NULL, 0, CFE_EVS_EventFilter_BINARY); + status = CFE_EVS_Register(NULL, 0, CFE_EVS_EventFilter_BINARY); + if (status != CFE_SUCCESS) + { + CFE_ES_WriteToSysLog("TO_LAB: Error registering for Event Services, RC = 0x%08X\n", (unsigned int)status); + return status; + } + /* ** Initialize housekeeping packet (clear user data area)... */