-
Notifications
You must be signed in to change notification settings - Fork 3k
Nanostack: Fix return code for unsupported socket options #7832
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
Conversation
@@ -816,6 +816,10 @@ nsapi_error_t Nanostack::getsockopt(void *handle, int level, int optname, void * | |||
|
|||
NanostackLockGuard lock; | |||
|
|||
if (level == NSAPI_SOCKET) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this could be done by better translation of the return code from Nanostack below, same for socket_setsockopt
above). As I recall, it properly distinguishes two codes (-2 and -3?) for "bad parameter" and "unsupported option".
If you had that translation correct below, then you wouldn't need this extra clause here.
19f05a6
to
b8a7e25
Compare
@kjbracey-arm Updated the commit according to your feedback |
/morph build |
Build : SUCCESSBuild number : 2845 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 2472 |
Test : SUCCESSBuild number : 2596 |
…options Nanostack: Fix return code for unsupported socket options
Description
Return NSAPI_ERROR_UNSUPPORTED if socket option is not supported
Pull request type