-
Notifications
You must be signed in to change notification settings - Fork 217
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
Incorrect status reporting from OS_SocketSendTo_Impl #1243
Comments
Not really clear what makes the current behavior "incorrect". osal/src/os/inc/osapi-sockets.h Lines 386 to 403 in 88f72d7
The API is documented as returning actual bytes sent, so the calling function should handle positive return values. |
Thanks for the clarification, fixed the calling function to account for this case. |
Describe the bug
The return value of
sendto
returns the number of characters sent on success and -1 on error. InOS_SocketSendTo_Impl
the return ofsendto
is being assigned as os_status and returned. This results in a non-zero (OS_SUCCESS
) status being reported back to the calling function which is interpreted as an errorTo Reproduce
Steps to reproduce the behavior:
OS_SocketSendTo_Impl
cmdUtil
os_result
Expected behavior
os_result
should beOS_SUCCESS
if the return value ofsendto != buflen
.Code snips
Reporter Info
Syed Huq, Kepler Communications.
The text was updated successfully, but these errors were encountered: