From 33f262d334c8fa3b48446fc207f86dd598b1a860 Mon Sep 17 00:00:00 2001 From: Avi Weiss Date: Fri, 30 May 2025 18:58:40 +0200 Subject: [PATCH] Fix #181, correct off-by-one error in CI_LAB_ReadUpLink --- fsw/src/ci_lab_app.c | 2 +- fsw/src/ci_lab_app.h | 10 ---------- fsw/src/ci_lab_eds_dispatch.c | 2 -- 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/fsw/src/ci_lab_app.c b/fsw/src/ci_lab_app.c index 95fc5d2..75e7688 100644 --- a/fsw/src/ci_lab_app.c +++ b/fsw/src/ci_lab_app.c @@ -218,7 +218,7 @@ void CI_LAB_ReadUpLink(void) CFE_Status_t CfeStatus; CFE_SB_Buffer_t *SBBufPtr; - for (i = 0; i <= CI_LAB_MAX_INGEST_PKTS; i++) + for (i = 0; i < CI_LAB_MAX_INGEST_PKTS; i++) { if (CI_LAB_Global.NetBufPtr == NULL) { diff --git a/fsw/src/ci_lab_app.h b/fsw/src/ci_lab_app.h index 2180cb7..d11857a 100644 --- a/fsw/src/ci_lab_app.h +++ b/fsw/src/ci_lab_app.h @@ -81,16 +81,6 @@ void CI_LAB_ReadUpLink(void); /* Global State Object */ extern CI_LAB_GlobalData_t CI_LAB_Global; -/* - * Individual message handler function prototypes - * - * Per the recommended code pattern, these should accept a const pointer - * to a structure type which matches the message, and return an int32 - * where CFE_SUCCESS (0) indicates successful handling of the message. - */ -int32 CI_LAB_Noop(const CI_LAB_NoopCmd_t *data); -int32 CI_LAB_ResetCounters(const CI_LAB_ResetCountersCmd_t *data); - /* Housekeeping message handler */ int32 CI_LAB_ReportHousekeeping(const CFE_MSG_CommandHeader_t *data); diff --git a/fsw/src/ci_lab_eds_dispatch.c b/fsw/src/ci_lab_eds_dispatch.c index 43e0282..818ceab 100644 --- a/fsw/src/ci_lab_eds_dispatch.c +++ b/fsw/src/ci_lab_eds_dispatch.c @@ -76,8 +76,6 @@ void CI_LAB_TaskPipe(const CFE_SB_Buffer_t *SBBufPtr) CFE_SB_MsgId_t MsgId; CFE_Status_t Status; - CFE_MSG_GetMsgId(&SBBufPtr->Msg, &MsgId); - Status = EdsDispatch_CI_LAB_Application_Telecommand(SBBufPtr, &CI_LAB_TC_DISPATCH_TABLE); if (Status != CFE_SUCCESS)