Skip to content
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

Fixes for Segger emNet to handle non-blocking want read/want write #7581

Merged
merged 1 commit into from
May 24, 2024

Conversation

dgarske
Copy link
Contributor

@dgarske dgarske commented May 23, 2024

Description

Fix for EMNET with non-blocking to handle want read/want write. Fix to not include standard POSIX headers like unistd.h for EMNET.

Fixes ZD 18012

Testing

Customer tested

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

@dgarske dgarske self-assigned this May 23, 2024
@bandi13
Copy link
Contributor

bandi13 commented May 23, 2024

retest this please

@dgarske dgarske assigned wolfSSL-Bot and unassigned dgarske May 23, 2024
@dgarske dgarske changed the title Fixes for Segger emNet to handle non-blocking want read/want write and missing unistd.h Fixes for Segger emNet to handle non-blocking want read/want write May 24, 2024
@dgarske dgarske assigned dgarske and JacobBarthelmeh and unassigned dgarske May 24, 2024
src/wolfio.c Outdated
#elif defined(WOLFSSL_EMNET)
if (old < 0) { /* SOCKET_ERROR */
/* Get the real socket error */
getsockopt(sd, SOL_SOCKET, SO_ERROR, &old, (int)sizeof(old));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This actually calls: IP_SOCK_getsockopt and API is int IP_SOCK_getsockopt(int hSock, int Level, int Name, void* pVal, int ValLen). Since the getsockopt is not fully compatible I might change this to use IP_SOCK_getsockopt directly. That API is included via IP/IP.h.

@dgarske dgarske assigned anhu and unassigned JacobBarthelmeh May 24, 2024
@anhu anhu self-requested a review May 24, 2024 21:29
@anhu anhu merged commit 021b573 into wolfSSL:master May 24, 2024
105 checks passed
jefferyq2 pushed a commit to jefferyq2/wolfssl that referenced this pull request Jun 9, 2024
Fixes for Segger emNet to handle non-blocking want read/want write
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants