You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gcoap_req_send currently returns non-zero positive on success and either zero or negative for failed transfers. This is error prone for users, even internally (see #19383).
Steps to reproduce the issue
Read the documentation
Expected results
Clear values for errors
Actual results
Both negative and zero are used to signal errors
The text was updated successfully, but these errors were encountered:
This also affects gcoap_req_send_tl (which AIU is stuck in an API-compatibility-change deprecation cycle that hasn't been completed); are there any other function with weird zero results?
This also affects gcoap_req_send_tl (which AIU is stuck in an API-compatibility-change deprecation cycle that hasn't been completed); are there any other function with weird zero results?
gcoap_req_send_tl() is the cause behind this as gcoap_req_send() calls it with a specific socket type.
The other one I've found is not necessarily weird, but gcoap_obs_send squashes all negative error codes from the internal _tl_send() to zero. That's the only one I've found in the gcoap code.
maribu
added
the
Type: bug
The issue reports a bug / The PR fixes a bug (including spelling errors)
label
May 22, 2023
Description
gcoap_req_send
currently returns non-zero positive on success and either zero or negative for failed transfers. This is error prone for users, even internally (see #19383).Steps to reproduce the issue
Read the documentation
Expected results
Clear values for errors
Actual results
Both negative and zero are used to signal errors
The text was updated successfully, but these errors were encountered: