diff options
author | Christian Beier <dontmind@freeshell.org> | 2016-04-15 10:29:33 +0200 |
---|---|---|
committer | Christian Beier <dontmind@freeshell.org> | 2016-04-15 10:29:33 +0200 |
commit | 2893c2b057dfddd25efdbda21ff9d2522763489a (patch) | |
tree | 904cd43d2be20b033e84da28f3dbd6971306573c | |
parent | 27d00248321717e94ffb84fd98f1f126028f192d (diff) | |
parent | dfa5e275792504c324e5c5080f5b688c1c26b568 (diff) | |
download | libtdevnc-2893c2b057dfddd25efdbda21ff9d2522763489a.tar.gz libtdevnc-2893c2b057dfddd25efdbda21ff9d2522763489a.zip |
Merge pull request #115 from solofox/master
Enable AF_UNIX socket: ignore setsockopt TCP_NODELAY failure.
-rw-r--r-- | libvncserver/rfbserver.c | 4 | ||||
-rw-r--r-- | libvncserver/sockets.c | 11 |
2 files changed, 4 insertions, 11 deletions
diff --git a/libvncserver/rfbserver.c b/libvncserver/rfbserver.c index 34e1c06..e2ab221 100644 --- a/libvncserver/rfbserver.c +++ b/libvncserver/rfbserver.c @@ -363,9 +363,7 @@ rfbNewTCPOrUDPClient(rfbScreenInfoPtr rfbScreen, if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (char *)&one, sizeof(one)) < 0) { - rfbLogPerror("setsockopt failed"); - close(sock); - return NULL; + rfbLogPerror("setsockopt failed: can't set TCP_NODELAY flag, non TCP socket?"); } FD_SET(sock,&(rfbScreen->allFds)); diff --git a/libvncserver/sockets.c b/libvncserver/sockets.c index f21f162..d8a66a1 100644 --- a/libvncserver/sockets.c +++ b/libvncserver/sockets.c @@ -146,8 +146,7 @@ rfbInitSockets(rfbScreenInfoPtr rfbScreen) if (setsockopt(rfbScreen->inetdSock, IPPROTO_TCP, TCP_NODELAY, (char *)&one, sizeof(one)) < 0) { - rfbLogPerror("setsockopt"); - return; + rfbLogPerror("setsockopt failed: can't set TCP_NODELAY flag, non TCP socket?"); } FD_ZERO(&(rfbScreen->allFds)); @@ -453,9 +452,7 @@ rfbProcessNewConnection(rfbScreenInfoPtr rfbScreen) if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (char *)&one, sizeof(one)) < 0) { - rfbLogPerror("rfbCheckFds: setsockopt"); - closesocket(sock); - return FALSE; + rfbLogPerror("rfbCheckFds: setsockopt failed: can't set TCP_NODELAY flag, non TCP socket?"); } #ifdef USE_LIBWRAP @@ -556,9 +553,7 @@ rfbConnect(rfbScreenInfoPtr rfbScreen, if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (char *)&one, sizeof(one)) < 0) { - rfbLogPerror("setsockopt failed"); - closesocket(sock); - return -1; + rfbLogPerror("setsockopt failed: can't set TCP_NODELAY flag, non TCP socket?"); } /* AddEnabledDevice(sock); */ |