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

sendto system call return value ignored #34

Open
theicfire opened this issue Apr 12, 2019 · 2 comments
Open

sendto system call return value ignored #34

theicfire opened this issue Apr 12, 2019 · 2 comments

Comments

@theicfire
Copy link

In RTPUDPv4Transmitter::SendRTPData, I notice that the return value of sendto is simply ignored. There's a variety of issues that may show up with the call. At the very least, it would be good to check that sendto was successful, by checking that the return value is the same as the length of bytes written. If it's not successful, some sort of error should show up, even it's as simple as "sendto failed".

@j0r1
Copy link
Owner

j0r1 commented Sep 1, 2019

While error reporting is certainly a good idea, I'm not sure how best to handle this in practice. These calls are in a loop, as several destinations are traversed.

I'm curious, did you encounter a problem with sendto in practice?

@theicfire
Copy link
Author

I didn't see them show up in practice, no. I think I was looking through the code when tracking down another issue (receive buffer sizes, which you allow to change, thanks!)

Frankly even a TODO comment on the sendto commands mentioning that the errors are being ignored would be a step in the right direction. If someone's tracking down a sendto issue, they could just print out errors themselves, like I ended up doing.

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

No branches or pull requests

2 participants