Skip to content

CDRIVER-6011 fix message of bson_strerror_r on Windows #2011

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 3 commits into from
May 14, 2025

Conversation

kevinAlbs
Copy link
Collaborator

Fix flipped check of strerror_s. This caused calls of bson_strerror_r on Windows to output "Unknown error" on known error codes.

Discovered when working on #2009.

@kevinAlbs kevinAlbs changed the title Fix message of bson_strerror_r on Windows CDRIVER-6011 fix message of bson_strerror_r on Windows May 14, 2025
@kevinAlbs kevinAlbs marked this pull request as ready for review May 14, 2025 16:52
@kevinAlbs kevinAlbs requested a review from a team as a code owner May 14, 2025 16:52
@kevinAlbs kevinAlbs requested review from vector-of-bool and eramongodb and removed request for vector-of-bool May 14, 2025 16:52
Copy link
Collaborator

@eramongodb eramongodb left a comment

Choose a reason for hiding this comment

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

Wow, nice catch. Completely missed this during all the strerror_r compatibility refinement work.

Co-authored-by: Ezra Chung <[email protected]>
@kevinAlbs
Copy link
Collaborator Author

Wow, nice catch. Completely missed this during all the strerror_r compatibility refinement work.

Thank you. I missed it too in review. I fortunately happened to spot this when seeing an "Unknown error" testing bad file paths.

@kevinAlbs kevinAlbs merged commit 0d50e9f into mongodb:master May 14, 2025
30 of 32 checks passed
kevinAlbs added a commit to kevinAlbs/mongo-c-driver that referenced this pull request May 14, 2025
kevinAlbs added a commit to kevinAlbs/mongo-c-driver that referenced this pull request May 14, 2025
kevinAlbs added a commit that referenced this pull request May 14, 2025
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