@@ -160,13 +160,27 @@ int32 CFE_SB_CreatePipe(CFE_SB_PipeId_t *PipeIdPtr, uint16 Depth, const char *
160
160
161
161
/* if OS_QueueCreate() failed because the pipe name passed in was already in use... */
162
162
/* let's make sure we don't alter the user's pipe ID data */
163
- if (Status == CFE_OS_ERR_NAME_TAKEN ){
164
- * PipeIdPtr = OriginalPipeIdParamValue ;
165
- }
166
-
167
- CFE_EVS_SendEventWithAppID (CFE_SB_CR_PIPE_ERR_EID ,CFE_EVS_EventType_ERROR ,CFE_SB .AppId ,
163
+ switch (Status ) {
164
+ case OS_ERR_NAME_TAKEN :
165
+ CFE_EVS_SendEventWithAppID (CFE_SB_CR_PIPE_NAME_TAKEN_EID ,CFE_EVS_EventType_ERROR ,CFE_SB .AppId ,
166
+ "CreatePipeErr:OS_QueueCreate failed, name taken (app=%s, name=%s)" ,
167
+ CFE_SB_GetAppTskName (TskId ,FullName ), PipeName );
168
+
169
+ * PipeIdPtr = OriginalPipeIdParamValue ;
170
+
171
+ break ;
172
+ case OS_ERR_NO_FREE_IDS :
173
+ CFE_EVS_SendEventWithAppID (CFE_SB_CR_PIPE_NO_FREE_EID ,CFE_EVS_EventType_ERROR ,CFE_SB .AppId ,
174
+ "CreatePipeErr:OS_QueueCreate failed, no free id's (app=%s)" ,
175
+ CFE_SB_GetAppTskName (TskId ,FullName ));
176
+
177
+ break ;
178
+ default :
179
+ CFE_EVS_SendEventWithAppID (CFE_SB_CR_PIPE_ERR_EID ,CFE_EVS_EventType_ERROR ,CFE_SB .AppId ,
168
180
"CreatePipeErr:OS_QueueCreate returned %d,app %s" ,
169
181
(int )Status ,CFE_SB_GetAppTskName (TskId ,FullName ));
182
+ }/* end switch(Status) */
183
+
170
184
return CFE_SB_PIPE_CR_ERR ;
171
185
}/* end if */
172
186
0 commit comments