-
Notifications
You must be signed in to change notification settings - Fork 162
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
snet: fix UDP port selection on Windows #4656
base: master
Are you sure you want to change the base?
Conversation
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.
It doesn't seem necessary to duplicate the code. If the only difference is the value of the error code, then please make a windows and unix versions of just that constant (of a function that abstracts iit to "thisIsTheErrorYourLookingFor()".
Reviewed 1 of 4 files at r1, all commit messages.
Reviewable status: 1 of 4 files reviewed, all discussions resolved
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 created a function errorIsAddrUnavailable() to test if the error code indicates an unavailable port as there are at least two error codes indicating this kind of situation in Windows.
Reviewable status: 0 of 6 files reviewed, all discussions resolved (waiting on @jiceatscion)
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.
Reviewed 6 of 6 files at r2, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @lschulz)
8eeea5f
to
4967f9f
Compare
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.
Reviewed 1 of 1 files at r3, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @lschulz)
SNET is checking the wrong error code when probing for available UDP ports.
Windows socket error codes are completely different from Linux, thus different OSes must be distinguished.