From ba420fc7bf0f82b1075959ccf25aea331789b874 Mon Sep 17 00:00:00 2001 From: Sara Golemon Date: Tue, 5 Apr 2005 23:08:41 +0000 Subject: [PATCH] Block means block. --- src/packet.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/packet.c b/src/packet.c index 1e84e8a..98a83a3 100644 --- a/src/packet.c +++ b/src/packet.c @@ -535,6 +535,15 @@ static int libssh2_blocking_read(LIBSSH2_SESSION *session, unsigned char *buf, s size_t bytes_read = 0; int polls = 0; +#ifndef WIN32 + fcntl(session->socket_fd, F_SETFL, 0); +#else + { + u_long block = FALSE; + ioctlsocket(session->socket_fd, FIONBIO, &block); + } +#endif + while (bytes_read < count) { int ret;