Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CFE_SB_GetBufferFromPool discarding CFE_ES_GetPoolBuf error status #2251

Open
skliper opened this issue Mar 3, 2023 · 0 comments
Open

CFE_SB_GetBufferFromPool discarding CFE_ES_GetPoolBuf error status #2251

skliper opened this issue Mar 3, 2023 · 0 comments

Comments

@skliper
Copy link
Contributor

skliper commented Mar 3, 2023

Is your feature request related to a problem? Please describe.
Many error cases within CFE_ES_GetPoolBuf just set the status code and return (no reporting). Then CFE_SB_GetBufferFromPool just discards it. Arguably not compliant with mission critical code requirements.

/* Allocate a new buffer descriptor from the SB memory pool.*/
stat1 = CFE_ES_GetPoolBuf(&addr, CFE_SB_Global.Mem.PoolHdl, AllocSize);
if (stat1 < 0)
{
return NULL;
}

Describe the solution you'd like
Definitely not the only case where returns get discarded or ignored (see #549) but this one is a significant shortcoming. Affects CFE_SB_TransmitMsg and CFE_SB_AllocateMessageBuffer.

Describe alternatives you've considered
Although apps need to check for a null return from CFE_SB_AllocateMessageBuffer either way, the error code is lost by that point. Another good use case for #1469, since you wouldn't want to flood events or sys log but the failure type and count is very important for monitoring system health.

Additional context
None

Requester Info
Jacob Hageman - NASA/GSFC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants