-
Notifications
You must be signed in to change notification settings - Fork 83
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 for the fact that windows file descriptors do not follow posix numbering standard #20
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Can you fix the following code style errors:
|
sreimers
changed the title
Fix for the fact that windows file descriptors do not follow possix numbering standard
Fix for the fact that windows file descriptors do not follow posix numbering standard
Sep 14, 2020
sreimers
reviewed
Sep 14, 2020
src/main/main.c
Outdated
@@ -221,6 +223,26 @@ static struct re *re_get(void) | |||
|
|||
#endif | |||
|
|||
#ifdef WIN32 | |||
// This code emulates possix numbering. There is no locking, so zero thread-safety. |
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.
Wording s/possix/POSIX/
Can you check again with "EPOLL", the patch runs in timeouts. |
That depends on whether epoll is supported on windows, because if not, I could try to run it under WSL, but I'd be at a disadvantage in debugging it there, since I haven't developed under linux in 20 years.
Mvh
John
…________________________________
Fra: Sebastian Reimers <notifications@github.com>
sendt: lørdag den 19. september 2020 13.05
til: baresip/re
Cc: johnjuuljensen; Author
Emne: Re: [baresip/re] Fix for the fact that windows file descriptors do not follow posix numbering standard (#20)
Can you check again with "EPOLL", the patch runs in timeouts.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#20 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABNFBJF6D4J4FKQ3YB5QQILSGSF53ANCNFSM4RK2PEGQ>.
|
Hi, I have fixed EPOLL and SELECT ( |
sreimers
pushed a commit
that referenced
this pull request
Sep 29, 2020
sreimers
added a commit
that referenced
this pull request
Oct 3, 2020
main: fix windows file descriptors #20 Co-authored-by: jjj <john.juul.jensen@hotmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resubmitting as requested.
Hey
So I tried to build and run under windows, but calling kept failing in fd_listen due to out of bounds check on the file descriptor.
I was pointed to this change: 49834b7
But thought it was somewhat invasive.
I ended up making this change instead. It's pretty simple and consists mostly of renaming of variables to clearly distinguish between what is an index into fhs and what is an actual descriptor handle.
The only new thing is the windows-only lookup_fd_index which maps file descriptors to indices.
Baresip compiles and runs and makes calls, when build with this version on windows SDK 10.
I have not tested anything under linux, not even compilation.
If you're interested, I can make any recommended changes and test it under linux.
Cheers,
John