fixed UNIX specific problem where non-blocking IO mode was not set for a special socket

that receives only broadcasts
This commit is contained in:
Jeff Hill
2005-04-11 20:58:14 +00:00
parent 649f9f6dc6
commit 983b2a3080
+13 -3
View File
@@ -281,16 +281,26 @@ void casDGIntfIO::show (unsigned level) const
void casDGIntfIO::xSetNonBlocking()
{
int status;
osiSockIoctl_t yes = true;
status = socket_ioctl(this->sock, FIONBIO, &yes); // X aCC 392
if (status<0) {
int status = socket_ioctl ( this->sock, FIONBIO, &yes ); // X aCC 392
if ( status < 0 ) {
char sockErrBuf[64];
epicsSocketConvertErrnoToString ( sockErrBuf, sizeof ( sockErrBuf ) );
errlogPrintf ( "%s:CAS: UDP non blocking IO set fail because \"%s\"\n",
__FILE__, sockErrBuf );
}
if ( this->bcastRecvSock != INVALID_SOCKET ) {
yes = true;
int status = socket_ioctl ( this->bcastRecvSock, FIONBIO, &yes ); // X aCC 392
if ( status < 0 ) {
char sockErrBuf[64];
epicsSocketConvertErrnoToString ( sockErrBuf, sizeof ( sockErrBuf ) );
errlogPrintf ( "%s:CAS: Broadcast receive UDP non blocking IO set failed because \"%s\"\n",
__FILE__, sockErrBuf );
}
}
}
inBufClient::fillCondition