Fix for the fact that windows file descriptors do not follow posix numbering standard#20
Closed
johnjuuljensen wants to merge 7 commits intobaresip:masterfrom
HeroBase:master
Closed
Fix for the fact that windows file descriptors do not follow posix numbering standard#20johnjuuljensen wants to merge 7 commits intobaresip:masterfrom HeroBase:master
johnjuuljensen wants to merge 7 commits intobaresip:masterfrom
HeroBase:master
Conversation
Member
|
Can you fix the following code style errors: |
sreimers
reviewed
Sep 14, 2020
src/main/main.c
Outdated
| #endif | ||
|
|
||
| #ifdef WIN32 | ||
| // This code emulates possix numbering. There is no locking, so zero thread-safety. |
Member
|
Can you check again with "EPOLL", the patch runs in timeouts. |
Contributor
Author
|
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 <[email protected]>
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>.
|
Member
|
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 <[email protected]>
This file contains hidden or 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
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