aboutsummaryrefslogtreecommitdiff
path: root/libssh
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cynapses.org>2010-06-17 13:23:03 +0200
committerAndreas Schneider <asn@cynapses.org>2010-06-17 13:23:03 +0200
commitd484d4e1299452ac4d103ce5c27f05db05041c6c (patch)
tree604b1698c3be7d2b50eafd97d4e7636c6e08d564 /libssh
parent985019ab64b8d07ba41b9d8056831140a8cd2618 (diff)
downloadlibssh-d484d4e1299452ac4d103ce5c27f05db05041c6c.tar.gz
libssh-d484d4e1299452ac4d103ce5c27f05db05041c6c.tar.xz
libssh-d484d4e1299452ac4d103ce5c27f05db05041c6c.zip
channel: Fixed the type of the max fd variable in ssh_channel_select().
Diffstat (limited to 'libssh')
-rw-r--r--libssh/channels.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libssh/channels.c b/libssh/channels.c
index 9f105be..869ef5a 100644
--- a/libssh/channels.c
+++ b/libssh/channels.c
@@ -2372,7 +2372,7 @@ int ssh_channel_select(ssh_channel *readchans, ssh_channel *writechans,
fd_set rset;
fd_set wset;
fd_set eset;
- int fdmax = -1;
+ socket_t max_fd = SSH_INVALID_SOCKET;
int rc;
int i;
@@ -2440,24 +2440,24 @@ int ssh_channel_select(ssh_channel *readchans, ssh_channel *writechans,
for (i = 0; readchans[i] != NULL; i++) {
if (!ssh_socket_fd_isset(readchans[i]->session->socket, &rset)) {
- ssh_socket_fd_set(readchans[i]->session->socket, &rset, &fdmax);
+ ssh_socket_fd_set(readchans[i]->session->socket, &rset, &max_fd);
}
}
for (i = 0; writechans[i] != NULL; i++) {
if (!ssh_socket_fd_isset(writechans[i]->session->socket, &wset)) {
- ssh_socket_fd_set(writechans[i]->session->socket, &wset, &fdmax);
+ ssh_socket_fd_set(writechans[i]->session->socket, &wset, &max_fd);
}
}
for (i = 0; exceptchans[i] != NULL; i++) {
if (!ssh_socket_fd_isset(exceptchans[i]->session->socket, &eset)) {
- ssh_socket_fd_set(exceptchans[i]->session->socket, &eset, &fdmax);
+ ssh_socket_fd_set(exceptchans[i]->session->socket, &eset, &max_fd);
}
}
/* Here we go */
- rc = select(fdmax, &rset, &wset, &eset, timeout);
+ rc = select(max_fd, &rset, &wset, &eset, timeout);
/* Leave if select was interrupted */
if (rc == EINTR) {
SAFE_FREE(rchans);