Skip to content

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

Merged
merged 1 commit into from
Aug 21, 2018

Conversation

juhaylinen
Copy link
Contributor

Description

Return NSAPI_ERROR_UNSUPPORTED if socket option is not supported

Pull request type

[X] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Breaking change

@0xc0170 0xc0170 requested a review from a team August 20, 2018 12:30
@@ -816,6 +816,10 @@ nsapi_error_t Nanostack::getsockopt(void *handle, int level, int optname, void *

NanostackLockGuard lock;

if (level == NSAPI_SOCKET) {
Copy link
Contributor

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.

@juhaylinen juhaylinen force-pushed the fix-nanostack-setsockoptions branch from 19f05a6 to b8a7e25 Compare August 20, 2018 13:31
@juhaylinen
Copy link
Contributor Author

@kjbracey-arm Updated the commit according to your feedback

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 20, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Aug 20, 2018

Build : SUCCESS

Build number : 2845
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/7832/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build
/morph mbed2-build

@mbed-ci
Copy link

mbed-ci commented Aug 20, 2018

@mbed-ci
Copy link

mbed-ci commented Aug 21, 2018

@cmonr cmonr merged commit d9367f8 into ARMmbed:master Aug 21, 2018
pan- pushed a commit to pan-/mbed that referenced this pull request Aug 22, 2018
…options

Nanostack: Fix return code for unsupported socket options
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants