Skip to content

Commit

Permalink
fix for nasa#308
Browse files Browse the repository at this point in the history
  • Loading branch information
CDKnightNASA committed Jan 6, 2020
1 parent 2b27dfc commit d8de94d
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions fsw/cfe-core/src/sb/cfe_sb_api.c
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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 */

Expand Down

0 comments on commit d8de94d

Please sign in to comment.