* fhandler_socket.cc (fhandler_socket::ioctl): Add FIONREAD handling.

This commit is contained in:
Corinna Vinschen 2004-02-09 11:30:57 +00:00
parent cec4879206
commit 9ec70d2019
2 changed files with 9 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2004-02-09 Ralf Habacker <ralf.habacker@freenet.de>
* fhandler_socket.cc (fhandler_socket::ioctl): Add FIONREAD handling.
2004-02-08 Christopher Faylor <cgf@redhat.com>
* debug.h (console_printf): Define for non-debugging condition.

View File

@ -1241,6 +1241,11 @@ fhandler_socket::ioctl (unsigned int cmd, void *p)
*(int *) p ? "started" : "cancelled");
set_async (*(int *) p);
break;
case FIONREAD:
res = ioctlsocket (get_socket (), FIONREAD, (unsigned long *) p);
if (res == SOCKET_ERROR)
set_winsock_errno ();
break;
default:
/* We must cancel WSAAsyncSelect (if any) before setting socket to
* blocking mode