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

Fixed API doc: SRT_INVALID_SOCK instead of SRT_ERROR in str_accept #2785

Merged
merged 1 commit into from
Aug 29, 2023

Conversation

lelegard
Copy link
Contributor

The functions srt_accept() and srt_accept_bond() return a SRTSOCKET. In case of error, the returned value is SRT_INVALID_SOCK, not SRT_ERROR. In practice, the two values are identical (-1) but they do not have the same semantics.

The functions srt_accept() and srt_accept_bond() return a SRTSOCKET.
In case of error, the returned value is SRT_INVALID_SOCK, not SRT_ERROR.
In practice, the two values are identical (-1) but they do not have
the same semantics.
@ethouris
Copy link
Collaborator

There is #2595 where I'm trying to systematize the use of the right error constant - it's still in draft stage and will have to be refreshed soon, but you have just touched the tip of the iceberg.

The same concerns, for example, the srt_connect function, although this thing is even more complicated. The above mentioned PR, beside adding more constants and types, also defines translation, but then especially for srt_connect it has also introduced a constant designated as 0 returned as it was before because with introduction of groups this function returns also a socket descriptor.

@lelegard
Copy link
Contributor Author

Good, thanks for the clarification @ethouris.
Sorry for the duplicate, you can drop this one then.

@maxsharabayko maxsharabayko added this to the v1.6.0 milestone Aug 22, 2023
@maxsharabayko maxsharabayko added Type: Bug Indicates an unexpected problem or unintended behavior [core] Area: Changes in SRT library core labels Aug 22, 2023
@ethouris
Copy link
Collaborator

Not exactly a duplicate. You pointed out actually something important; my PR doesn't include changes in the documentation and I must have missed this thing. I'll update this PR with at least some to do to fix this, too.

@maxsharabayko maxsharabayko modified the milestones: v1.6.0, v1.5.3 Aug 29, 2023
@maxsharabayko maxsharabayko added [docs] Area: Improvements or additions to documentation and removed [core] Area: Changes in SRT library core labels Aug 29, 2023
@maxsharabayko maxsharabayko merged commit 09f35c0 into Haivision:master Aug 29, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[docs] Area: Improvements or additions to documentation Type: Bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants