diff --git a/fsw/src/to_lab_app.c b/fsw/src/to_lab_app.c index 17e2660..8ad9f39 100644 --- a/fsw/src/to_lab_app.c +++ b/fsw/src/to_lab_app.c @@ -202,16 +202,16 @@ int32 TO_LAB_init(void) /* Subscriptions for TLM pipe*/ for (i = 0; (i < (sizeof(TO_LAB_Subs->Subs) / sizeof(TO_LAB_Subs->Subs[0]))); i++) { - if (!CFE_SB_IsValidMsgId(TO_LAB_Subs->Subs[i].Stream)) - { - /* Only process until invalid MsgId (aka TO_LAB_UNUSED) is found*/ - break; - } - else if (CFE_SB_IsValidMsgId(TO_LAB_Subs->Subs[i].Stream)) + if (CFE_SB_IsValidMsgId(TO_LAB_Subs->Subs[i].Stream)) { status = CFE_SB_SubscribeEx(TO_LAB_Subs->Subs[i].Stream, TO_LAB_Global.Tlm_pipe, TO_LAB_Subs->Subs[i].Flags, TO_LAB_Subs->Subs[i].BufLimit); } + else + { + /* Only process until invalid MsgId (aka TO_LAB_UNUSED) is found*/ + break; + } if (status != CFE_SUCCESS) CFE_EVS_SendEvent(TO_LAB_SUBSCRIBE_ERR_EID, CFE_EVS_EventType_ERROR,