From 7e93cb7a75d99a604dea97e0b029d03b0f534d49 Mon Sep 17 00:00:00 2001 From: Mathew McCaskey Date: Mon, 11 Jan 2021 17:13:48 -0500 Subject: [PATCH] Table verification bug fix. CRC lookup tables are initialized and the status of the crc check is saved. --- cfe/fsw/cfe-core/src/sb/cfe_sb_init.c | 6 ++++++ cfe/fsw/cfe-core/src/tbl/cfe_tbl_internal.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/cfe/fsw/cfe-core/src/sb/cfe_sb_init.c b/cfe/fsw/cfe-core/src/sb/cfe_sb_init.c index fdc0c2173..14f36d627 100644 --- a/cfe/fsw/cfe-core/src/sb/cfe_sb_init.c +++ b/cfe/fsw/cfe-core/src/sb/cfe_sb_init.c @@ -41,6 +41,7 @@ #include "cfe_error.h" #include "cfe_sb_events.h" #include "cfe_sb_eds_db.h" +#include "edslib_init.h" #include "base_types_eds_dictionary.h" #include "ccsds_spacepacket_eds_dictionary.h" @@ -144,6 +145,11 @@ int32 CFE_SB_EarlyInit (void) { CFE_SB_EDS_RegisterGlobal(&BASE_TYPES_DATATYPE_DB); CFE_SB_EDS_RegisterGlobal(&CCSDS_SPACEPACKET_DATATYPE_DB); + /* + * Call the EdsLib initilization function. + * This populates the CRC lookup tables in EdsLib. + */ + EdsLib_Initialize(); return Stat; diff --git a/cfe/fsw/cfe-core/src/tbl/cfe_tbl_internal.c b/cfe/fsw/cfe-core/src/tbl/cfe_tbl_internal.c index 31cb0fd7a..4692c699c 100644 --- a/cfe/fsw/cfe-core/src/tbl/cfe_tbl_internal.c +++ b/cfe/fsw/cfe-core/src/tbl/cfe_tbl_internal.c @@ -1141,7 +1141,7 @@ int32 CFE_TBL_LoadFromFileAndDecode(const char *AppName, CFE_TBL_LoadBuff_t *Wor */ if (Status == CFE_SUCCESS) { - CFE_TBL_DecodeFromMemory(ScratchBufferPtr->BufferPtr, WorkingBufferPtr, RegRecPtr); + Status = CFE_TBL_DecodeFromMemory(ScratchBufferPtr->BufferPtr, WorkingBufferPtr, RegRecPtr); } strncpy(WorkingBufferPtr->DataSource, Filename, sizeof(WorkingBufferPtr->DataSource)-1);