Skip to content

Commit 8c051d2

Browse files
Fix #2781, guard server-only TIME message ID
Signed-off-by: Sylvester Kaczmarek <16242628+sylvesterkaczmarek@users.noreply.github.com>
1 parent f22e538 commit 8c051d2

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

‎modules/time/fsw/src/cfe_time_dispatch.c‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,9 @@ void CFE_TIME_TaskPipe(const CFE_SB_Buffer_t *SBBufPtr)
220220
static CFE_SB_MsgId_t ONEHZ_CMD_MID = CFE_SB_MSGID_RESERVED;
221221
static CFE_SB_MsgId_t TONE_CMD_MID = CFE_SB_MSGID_RESERVED;
222222
static CFE_SB_MsgId_t DATA_CMD_MID = CFE_SB_MSGID_RESERVED;
223-
static CFE_SB_MsgId_t SEND_CMD_MID = CFE_SB_MSGID_RESERVED;
223+
#if (CFE_PLATFORM_TIME_CFG_SERVER == true)
224+
static CFE_SB_MsgId_t SEND_CMD_MID = CFE_SB_MSGID_RESERVED;
225+
#endif
224226

225227
CFE_SB_MsgId_t MessageID = CFE_SB_INVALID_MSG_ID;
226228

@@ -232,7 +234,9 @@ void CFE_TIME_TaskPipe(const CFE_SB_Buffer_t *SBBufPtr)
232234
ONEHZ_CMD_MID = CFE_SB_ValueToMsgId(CFE_TIME_ONEHZ_CMD_MID);
233235
TONE_CMD_MID = CFE_SB_ValueToMsgId(CFE_TIME_TONE_CMD_MID);
234236
DATA_CMD_MID = CFE_SB_ValueToMsgId(CFE_TIME_DATA_CMD_MID);
235-
SEND_CMD_MID = CFE_SB_ValueToMsgId(CFE_TIME_SEND_CMD_MID);
237+
#if (CFE_PLATFORM_TIME_CFG_SERVER == true)
238+
SEND_CMD_MID = CFE_SB_ValueToMsgId(CFE_TIME_SEND_CMD_MID);
239+
#endif
236240
}
237241

238242
CFE_MSG_GetMsgId(&SBBufPtr->Msg, &MessageID);

0 commit comments

Comments
 (0)