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

fix coap_socket_strerror() on Windows #1598

Merged
merged 1 commit into from
Mar 11, 2025
Merged

Conversation

mkicherer
Copy link
Contributor

The Windows version of coap_socket_strerror calls coap_socket_format_errno with the result of WSAGetLastError. At least in my specific case, this results in an "unknown error" message as WSAGetLastError seems to use different numbers than strerror.

coap_io_process_with_fds_lkd tries to translate WSAGetLastError to errno with coap_win_error_to_errno but the Windows version of coap_socket_strerror does not use errno, so coap_win_error_to_errno is called in vain.

With this patch, coap_win_error_to_errno is always called in the Windows version of coap_socket_strerror and then errnois passed to coap_socket_format_errno and therefore strerror.

@mkicherer
Copy link
Contributor Author

Sorry, coap_win_error_to_errno is obviously needed in coap_io_process_with_fds_lkd. Please ignore this part of the comment.

@mrdeep1
Copy link
Collaborator

mrdeep1 commented Mar 11, 2025

The update change looks fine to me.

Looks like git.savannah.nongnu.org is currently down for doing the LwIP CI test.

@mrdeep1 mrdeep1 merged commit c3b4be2 into obgm:develop Mar 11, 2025
30 of 31 checks passed
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.

2 participants