Skip to content
Closed
Changes from 1 commit
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
20 changes: 18 additions & 2 deletions modules/evs/fsw/src/cfe_evs.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/************************************************************************
/************************************************************************
* NASA Docket No. GSC-19,200-1, and identified as "cFS Draco"
*
* Copyright (c) 2023 United States Government as represented by the
Expand Down Expand Up @@ -185,7 +185,22 @@ CFE_Status_t CFE_EVS_SendEventWithAppID(uint16 EventID,
AppDataPtr = EVS_GetAppDataByID(AppID);
if (AppDataPtr == NULL)
{
Status = CFE_EVS_APP_ILLEGAL_APP_ID;
/*
* Check if the AppId is the caller's own AppId (e.g. during cFE startup
* when ES/EVS tasks initialize before full registration). In this case,
* allow the event to proceed rather than returning ILLEGAL_APP_ID.
*/
CFE_ES_AppId_t callerAppId;
EVS_AppData_t *callerAppData;
int32 status = EVS_GetCurrentContext(&callerAppData, &callerAppId);
if (status == CFE_SUCCESS && callerAppData != NULL && CFE_RESOURCEID_TEST_EQUAL\(callerAppId, AppID\))
{
Status = CFE_SUCCESS;
}
else
{
Status = CFE_EVS_APP_ILLEGAL_APP_ID;
}
}
else if (!EVS_AppDataIsMatch(AppDataPtr, AppID))
{
Expand Down Expand Up @@ -334,3 +349,4 @@ CFE_Status_t CFE_EVS_ResetAllFilters(void)

return Status;
}