Netware and Windows fixes by Guenter Knauf

This commit is contained in:
Daniel Stenberg
2007-02-07 21:21:06 +00:00
parent b88eb6a096
commit e7181a8c36
13 changed files with 1689 additions and 5 deletions

View File

@@ -374,8 +374,6 @@ struct _LIBSSH2_MAC_METHOD {
int (*dtor)(LIBSSH2_SESSION *session, void **abstract);
};
#ifdef LIBSSH2DEBUG
void _libssh2_debug(LIBSSH2_SESSION *session, int context, const char *format, ...);
#define LIBSSH2_DBG_TRANS 1
#define LIBSSH2_DBG_KEX 2
#define LIBSSH2_DBG_AUTH 3
@@ -384,6 +382,8 @@ void _libssh2_debug(LIBSSH2_SESSION *session, int context, const char *format, .
#define LIBSSH2_DBG_SFTP 6
#define LIBSSH2_DBG_ERROR 7
#define LIBSSH2_DBG_PUBLICKEY 8
#ifdef LIBSSH2DEBUG
void _libssh2_debug(LIBSSH2_SESSION *session, int context, const char *format, ...);
#else
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
/* C99 style */

View File

@@ -971,13 +971,13 @@ LIBSSH2_API int libssh2_poll(LIBSSH2_POLLFD *fds, unsigned int nfds,
case LIBSSH2_POLLFD_CHANNEL:
if (FD_ISSET(fds[i].fd.channel->session->socket_fd, &rfds)) {
/* Spin session until no data available */
while (libssh2_packet_read(fds[i].fd.channel->session, 0) > 0);
while (libssh2_packet_read(fds[i].fd.channel->session) > 0);
}
break;
case LIBSSH2_POLLFD_LISTENER:
if (FD_ISSET(fds[i].fd.listener->session->socket_fd, &rfds)) {
/* Spin session until no data available */
while (libssh2_packet_read(fds[i].fd.listener->session, 0) > 0);
while (libssh2_packet_read(fds[i].fd.listener->session) > 0);
}
break;
}