diff --git a/fsw/cfe-core/src/sb/cfe_sb_api.c b/fsw/cfe-core/src/sb/cfe_sb_api.c index ee7f2d6ad..ff231e4be 100644 --- a/fsw/cfe-core/src/sb/cfe_sb_api.c +++ b/fsw/cfe-core/src/sb/cfe_sb_api.c @@ -1,5 +1,5 @@ /* -** GSC-18128-1, "Core Flight Executive Version 6.7" +** GSC-18128-1, "Core Flight Executive Version 6.6" ** ** Copyright (c) 2006-2019 United States Government as represented by ** the Administrator of the National Aeronautics and Space Administration. @@ -160,13 +160,27 @@ int32 CFE_SB_CreatePipe(CFE_SB_PipeId_t *PipeIdPtr, uint16 Depth, const char * /* if OS_QueueCreate() failed because the pipe name passed in was already in use... */ /* let's make sure we don't alter the user's pipe ID data */ - if (Status == CFE_OS_ERR_NAME_TAKEN){ - *PipeIdPtr = OriginalPipeIdParamValue; - } - - CFE_EVS_SendEventWithAppID(CFE_SB_CR_PIPE_ERR_EID,CFE_EVS_EventType_ERROR,CFE_SB.AppId, + switch(Status) { + case CFE_OS_ERR_NAME_TAKEN: + CFE_EVS_SendEventWithAppID(CFE_SB_CR_PIPE_ERR_EID,CFE_EVS_EventType_ERROR,CFE_SB.AppId, + "CreatePipeErr:OS_QueueCreate failed, name taken (app=%s, name=%s)", + CFE_SB_GetAppTskName(TskId,FullName), PipeName); + + *PipeIdPtr = OriginalPipeIdParamValue; + + break; + case OS_ERR_NO_FREE_IDS: + CFE_EVS_SendEventWithAppID(CFE_SB_CR_PIPE_ERR_EID,CFE_EVS_EventType_ERROR,CFE_SB.AppId, + "CreatePipeErr:OS_QueueCreate failed, no free id's (app=%s)", + CFE_SB_GetAppTskName(TskId,FullName)); + + break; + default: + CFE_EVS_SendEventWithAppID(CFE_SB_CR_PIPE_ERR_EID,CFE_EVS_EventType_ERROR,CFE_SB.AppId, "CreatePipeErr:OS_QueueCreate returned %d,app %s", (int)Status,CFE_SB_GetAppTskName(TskId,FullName)); + }/* end switch(Status) */ + return CFE_SB_PIPE_CR_ERR; }/* end if */