From 0e88250ffa361c2fd4fcede9c8c842d6bc332ffa Mon Sep 17 00:00:00 2001 From: Avi Date: Wed, 26 Oct 2022 05:59:17 +1000 Subject: [PATCH] Fix #1450, Remove duplicate status check --- modules/evs/fsw/src/cfe_evs_task.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/modules/evs/fsw/src/cfe_evs_task.c b/modules/evs/fsw/src/cfe_evs_task.c index aa17309da..eb9c56bf5 100644 --- a/modules/evs/fsw/src/cfe_evs_task.c +++ b/modules/evs/fsw/src/cfe_evs_task.c @@ -991,6 +991,10 @@ int32 CFE_EVS_EnableAppEventTypeCmd(const CFE_EVS_EnableAppEventTypeCmd_t *data) else { EVS_EnableTypes(AppDataPtr, CmdPtr->BitMask); + + EVS_SendEvent(CFE_EVS_ENAAPPEVTTYPE_EID, CFE_EVS_EventType_DEBUG, + "Enable App Event Type Command Received with AppName = %s, EventType Bit Mask = 0x%02x", + LocalName, CmdPtr->BitMask); } } else if (Status == CFE_EVS_APP_NOT_REGISTERED) @@ -1011,13 +1015,6 @@ int32 CFE_EVS_EnableAppEventTypeCmd(const CFE_EVS_EnableAppEventTypeCmd_t *data) (long unsigned int)CFE_EVS_ENABLE_APP_EVENT_TYPE_CC); } - if (Status == CFE_SUCCESS) - { - EVS_SendEvent(CFE_EVS_ENAAPPEVTTYPE_EID, CFE_EVS_EventType_DEBUG, - "Enable App Event Type Command Received with AppName = %s, EventType Bit Mask = 0x%02x", - LocalName, CmdPtr->BitMask); - } - return Status; } @@ -1053,6 +1050,10 @@ int32 CFE_EVS_DisableAppEventTypeCmd(const CFE_EVS_DisableAppEventTypeCmd_t *dat else { EVS_DisableTypes(AppDataPtr, CmdPtr->BitMask); + + EVS_SendEvent(CFE_EVS_DISAPPENTTYPE_EID, CFE_EVS_EventType_DEBUG, + "Disable App Event Type Command Received with AppName = %s, EventType Bit Mask = 0x%02x", + LocalName, (unsigned int)CmdPtr->BitMask); } } else if (Status == CFE_EVS_APP_NOT_REGISTERED) @@ -1073,13 +1074,6 @@ int32 CFE_EVS_DisableAppEventTypeCmd(const CFE_EVS_DisableAppEventTypeCmd_t *dat (long unsigned int)CFE_EVS_DISABLE_APP_EVENT_TYPE_CC); } - if (Status == CFE_SUCCESS) - { - EVS_SendEvent(CFE_EVS_DISAPPENTTYPE_EID, CFE_EVS_EventType_DEBUG, - "Disable App Event Type Command Received with AppName = %s, EventType Bit Mask = 0x%02x", - LocalName, (unsigned int)CmdPtr->BitMask); - } - return Status; }