Skip to content

Commit

Permalink
Fix #303, check that module type is not invalid
Browse files Browse the repository at this point in the history
Rather than only calling "Init" on a "SIMPLE" module type, just
check that it is not invalid instead.  Even extension types
still have an Init routine that needs to be called.
  • Loading branch information
jphickey committed Sep 3, 2021
1 parent 6d40816 commit c0d7cae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fsw/shared/src/cfe_psp_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ void CFE_PSP_ModuleInitList(CFE_StaticModuleLoadEntry_t *ListPtr)
while (Entry->Name != NULL)
{
ApiPtr = (CFE_PSP_ModuleApi_t *)Entry->Api;
if ((uint32)ApiPtr->ModuleType == CFE_PSP_MODULE_TYPE_SIMPLE && ApiPtr->Init != NULL)
if ((uint32)ApiPtr->ModuleType != CFE_PSP_MODULE_TYPE_INVALID && ApiPtr->Init != NULL)
{
(*ApiPtr->Init)(CFE_PSP_MODULE_BASE | CFE_PSP_ModuleCount);
}
Expand Down
4 changes: 3 additions & 1 deletion unit-test-coverage/modules/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
#
######################################################################

message(STATUS "inside utcov psp modules")
return()

include_directories("${PSPCOVERAGE_SOURCE_DIR}/shared/inc")
include_directories("${PSPCOVERAGE_SOURCE_DIR}/modules/inc")

Expand Down Expand Up @@ -64,4 +67,3 @@ set(UT_PSPMODLIST
foreach(UT_PSPMOD ${UT_PSPMODLIST})
add_subdirectory(${CFEPSP_SOURCE_DIR}/fsw/modules/${UT_PSPMOD} ${UT_PSPMOD})
endforeach()

0 comments on commit c0d7cae

Please sign in to comment.