From ec6a8f79e9f18132ad96d4a641bc78acd49747c3 Mon Sep 17 00:00:00 2001 From: Chris Knight Date: Thu, 18 Jun 2020 10:02:50 -0700 Subject: [PATCH] fix #744 - update LastSender in pipe description and add AppId to buf desc --- fsw/cfe-core/src/inc/cfe_sb.h | 1 + fsw/cfe-core/src/sb/cfe_sb_api.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/fsw/cfe-core/src/inc/cfe_sb.h b/fsw/cfe-core/src/inc/cfe_sb.h index 7f92c3794..b2b29caa8 100644 --- a/fsw/cfe-core/src/inc/cfe_sb.h +++ b/fsw/cfe-core/src/inc/cfe_sb.h @@ -215,6 +215,7 @@ extern CFE_SB_Qos_t CFE_SB_Default_Qos;/**< \brief Defines a default priority a **/ typedef struct { uint32 ProcessorId;/**< \brief Processor Id from which the message was sent */ + uint32 AppId;/**< \brief Application Id from which the message was sent */ char AppName[OS_MAX_API_NAME];/**< \brief Application that sent the message */ } CFE_SB_SenderId_t; diff --git a/fsw/cfe-core/src/sb/cfe_sb_api.c b/fsw/cfe-core/src/sb/cfe_sb_api.c index 7ae142532..c24a55d7c 100644 --- a/fsw/cfe-core/src/sb/cfe_sb_api.c +++ b/fsw/cfe-core/src/sb/cfe_sb_api.c @@ -1324,6 +1324,7 @@ int32 CFE_SB_SendMsgFull(CFE_SB_Msg_t *MsgPtr, if(CFE_SB.SenderReporting != 0) { BufDscPtr->Sender.ProcessorId = CFE_PSP_GetProcessorId(); + BufDscPtr->Sender.AppId = CFE_SB.AppId; strncpy(&BufDscPtr->Sender.AppName[0],CFE_SB_GetAppTskName(TskId,FullName),OS_MAX_API_NAME); } @@ -1347,6 +1348,8 @@ int32 CFE_SB_SendMsgFull(CFE_SB_Msg_t *MsgPtr, PipeDscPtr = &CFE_SB.PipeTbl[DestPtr->PipeId]; + PipeDscPtr->LastSender = CFE_SB.AppId; + if(PipeDscPtr->Opts & CFE_SB_PIPEOPTS_IGNOREMINE) { uint32 AppId = 0xFFFFFFFF;