Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Nanostack: translate errors from sendmsg #10410
Translate errors to NSAPI_ERROR_*, instead of always returning NSAPI_ERROR_DEVICE_ERROR.
Originally, I only wanted to add the handling of -2 (out of memory) error, to fix the numerous SENDTO_REPEAT failures I can see in Nanostack, but while I was at it I though it is wise to translate the other errors as well, instead of just returning DEVICE_ERROR and loosing the information returned from sendmsg call.
Pull request type
Nanostack send calls return a more accurate information in case of errors.
@adbridge , I would say this is more of a fix - after all the function call looks the same and the return type does not change either. We only fix the code to return appropriate error values.
I will leave it up to you to decide - the Release Note is added.
@adbridge , I misunderstood "interface change" to be a PR that will actually change the API (like add a new function, a parameter or change return type). But giving it a second thought - you are right: anything that can become an annoyance to the users better be communicated clearly in the release notes.
Apr 26, 2019
26 checks passed
Application that expects certain kind of errors, sound a bit unstable in a first place.
Being portable, application should be able to fail gracefully in any error, and work normally between all connectivities we offer.
To me this change brings clarify to Nanostack's error codes, but Anna's concern is valid, and we should therefore release this only in 5.13.