diff --git a/fsw/inc/hs_events.h b/fsw/inc/hs_events.h index 30675b0..f72141c 100644 --- a/fsw/inc/hs_events.h +++ b/fsw/inc/hs_events.h @@ -648,7 +648,7 @@ * \par Cause: * * This event message is issued on the first error when a table validation - * fails for a application monitor table load. + * fails for an application monitor table load. */ #define HS_AMTVAL_ERR_EID 51 @@ -708,7 +708,7 @@ * \par Cause: * * This event message is issued when a table validation has been - * completed for an message actions table load + * completed for a message actions table load */ #define HS_MATVAL_INF_EID 56 @@ -720,7 +720,7 @@ * \par Cause: * * This event message is issued on the first error when a table validation - * fails for an message actions table load. + * fails for a message actions table load. */ #define HS_MATVAL_ERR_EID 57 diff --git a/fsw/src/hs_cmds.c b/fsw/src/hs_cmds.c index 1169249..4b19fef 100644 --- a/fsw/src/hs_cmds.c +++ b/fsw/src/hs_cmds.c @@ -417,14 +417,6 @@ void HS_EnableEventMonCmd(const CFE_SB_Buffer_t *BufPtr) { Status = CFE_SB_SubscribeEx(CFE_SB_ValueToMsgId(CFE_EVS_LONG_EVENT_MSG_MID), HS_AppData.EventPipe, CFE_SB_DEFAULT_QOS, HS_EVENT_PIPE_DEPTH); - - if (Status != CFE_SUCCESS) - { - CFE_EVS_SendEvent(HS_EVENTMON_LONG_SUB_EID, CFE_EVS_EventType_ERROR, - "Event Monitor Enable: Error Subscribing to long-format Events,RC=0x%08X", - (unsigned int)Status); - } - if (Status == CFE_SUCCESS) { Status = CFE_SB_SubscribeEx(CFE_SB_ValueToMsgId(CFE_EVS_SHORT_EVENT_MSG_MID), HS_AppData.EventPipe, @@ -437,6 +429,12 @@ void HS_EnableEventMonCmd(const CFE_SB_Buffer_t *BufPtr) (unsigned int)Status); } } + else + { + CFE_EVS_SendEvent(HS_EVENTMON_LONG_SUB_EID, CFE_EVS_EventType_ERROR, + "Event Monitor Enable: Error Subscribing to long-format Events,RC=0x%08X", + (unsigned int)Status); + } } if (Status == CFE_SUCCESS) @@ -474,13 +472,6 @@ void HS_DisableEventMonCmd(const CFE_SB_Buffer_t *BufPtr) { Status = CFE_SB_Unsubscribe(CFE_SB_ValueToMsgId(CFE_EVS_LONG_EVENT_MSG_MID), HS_AppData.EventPipe); - if (Status != CFE_SUCCESS) - { - CFE_EVS_SendEvent(HS_EVENTMON_LONG_UNSUB_EID, CFE_EVS_EventType_ERROR, - "Event Monitor Disable: Error Unsubscribing from long-format Events,RC=0x%08X", - (unsigned int)Status); - } - if (Status == CFE_SUCCESS) { Status = CFE_SB_Unsubscribe(CFE_SB_ValueToMsgId(CFE_EVS_SHORT_EVENT_MSG_MID), HS_AppData.EventPipe); @@ -492,6 +483,12 @@ void HS_DisableEventMonCmd(const CFE_SB_Buffer_t *BufPtr) (unsigned int)Status); } } + else + { + CFE_EVS_SendEvent(HS_EVENTMON_LONG_UNSUB_EID, CFE_EVS_EventType_ERROR, + "Event Monitor Disable: Error Unsubscribing from long-format Events,RC=0x%08X", + (unsigned int)Status); + } } if (Status == CFE_SUCCESS)