diff --git a/fsw/src/md_app.c b/fsw/src/md_app.c index afd764f..f5ad52f 100644 --- a/fsw/src/md_app.c +++ b/fsw/src/md_app.c @@ -185,18 +185,17 @@ int32 MD_AppInit(void) /* Register for event services...*/ Status = CFE_EVS_Register(NULL, 0, CFE_EVS_NO_FILTER); - if (Status != CFE_SUCCESS) - { - CFE_ES_WriteToSysLog("MD_APP:Call to CFE_EVS_Register Failed:RC=%d\n", Status); - } - - /* - ** Set up for Software Bus Services - */ if (Status == CFE_SUCCESS) { + /* + ** Set up for Software Bus Services + */ Status = MD_InitSoftwareBusServices(); } + else + { + CFE_ES_WriteToSysLog("MD_APP:Call to CFE_EVS_Register Failed:RC=%d\n", Status); + } /* ** Register for Table Services @@ -271,16 +270,11 @@ int32 MD_InitSoftwareBusServices(void) */ Status = CFE_SB_CreatePipe(&MD_AppData.CmdPipe, MD_PIPE_DEPTH, MD_PIPE_NAME); - if (Status != CFE_SUCCESS) - { - CFE_EVS_SendEvent(MD_CREATE_PIPE_ERR_EID, CFE_EVS_EventType_ERROR, "Failed to create pipe. RC = %d", Status); - } - - /* - ** Subscribe to Housekeeping request commands - */ if (Status == CFE_SUCCESS) { + /* + ** Subscribe to Housekeeping request commands + */ Status = CFE_SB_Subscribe(CFE_SB_ValueToMsgId(MD_SEND_HK_MID), MD_AppData.CmdPipe); if (Status != CFE_SUCCESS) @@ -289,6 +283,10 @@ int32 MD_InitSoftwareBusServices(void) Status); } } + else + { + CFE_EVS_SendEvent(MD_CREATE_PIPE_ERR_EID, CFE_EVS_EventType_ERROR, "Failed to create pipe. RC = %d", Status); + } /* ** Subscribe to MD ground command packets