-
Notifications
You must be signed in to change notification settings - Fork 1
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 solaris unit tests #19
Fix solaris unit tests #19
Conversation
…uested size exceeds the system maximum value. Also do not reduce the buffer sizes.
Before the PR: The unit test hangs part way through. |
After the PR: Unit tests run successfully. |
socklen_t optSize; | ||
int startRCVBUF = 0; | ||
optSize = sizeof(startRCVBUF); |
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.
socklen_t optSize; | |
int startRCVBUF = 0; | |
optSize = sizeof(startRCVBUF); | |
int startRCVBUF = 0; | |
socklen_t optSize = sizeof startRCVBUF; |
if (0 != ::getsockopt( | ||
m_iSocket, SOL_SOCKET, SO_RCVBUF, (void*)¤tRCVBUF, &optSize)) | ||
{ | ||
currentRCVBUF = -1; | ||
} |
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 think this duplicates line 272, doesn't it?
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.
And you no longer set the option to maxsize
?
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.
Well it may be changed, but return an error. For instance it seems on SunOS it sets to the max allowed system size, and then returns -1 if the requested size could not be set.
Which seems to be >64k, in which case we dont want to reduce the size back to 64k.
A new PR submitted to Haivision#2162 |
This resolves solaris unit tests failures caused by
srt::CChannel::setUDPSockOpt()
callingsetsockopt()
which can return failure when attempting to increase the SND|RCV buffers in excess of the system maximums. It seems that since Linux is the odd duck here, this should be the default implementation for all platforms?This also makes sure that we dont try to reduce the size of the SND|RCV buffers as the default is >64k on Solaris and I think most BSD platforms. I assume reducing the size is not a good idea?