Commit 43afa30a authored by Stas Korobeynikov's avatar Stas Korobeynikov Committed by Pavel Vainerman

fix select for nx_proxy_select

parent a229741f
...@@ -113,6 +113,12 @@ ...@@ -113,6 +113,12 @@
#include "ssherr.h" #include "ssherr.h"
#include "hostfile.h" #include "hostfile.h"
/*
* Used in NX network related functions.
*/
#include "NX.h"
#include "proxy.h"
/* /*
* Set here the requested log level. * Set here the requested log level.
...@@ -713,7 +719,7 @@ client_wait_until_can_do_something(fd_set **readsetp, fd_set **writesetp, ...@@ -713,7 +719,7 @@ client_wait_until_can_do_something(fd_set **readsetp, fd_set **writesetp,
tvp = &tv; tvp = &tv;
} }
ret = select((*maxfdp)+1, *readsetp, *writesetp, NULL, tvp); ret = nx_proxy_select((*maxfdp)+1, *readsetp, *writesetp, NULL, tvp);
if (ret < 0) { if (ret < 0) {
char buf[100]; char buf[100];
......
...@@ -92,6 +92,17 @@ ...@@ -92,6 +92,17 @@
#define DBG(x) #define DBG(x)
#endif #endif
/*
* Used in NX network related functions.
*/
#include "NX.h"
#include "proxy.h"
/*
* Set here the requested log level.
*/
#define PANIC #define PANIC
#define WARNING #define WARNING
#undef TEST #undef TEST
...@@ -1462,8 +1473,7 @@ ssh_packet_read_seqnr(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p) ...@@ -1462,8 +1473,7 @@ ssh_packet_read_seqnr(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p)
ms_to_timeval(&timeout, ms_remain); ms_to_timeval(&timeout, ms_remain);
gettimeofday(&start, NULL); gettimeofday(&start, NULL);
} }
if ((r = select(state->connection_in + 1, setp, if ((r = nx_proxy_select(state->connection_in + 1, setp, NULL, NULL, NULL)) >= 0)
NULL, NULL, timeoutp)) >= 0)
break; break;
if (errno != EAGAIN && errno != EINTR && if (errno != EAGAIN && errno != EINTR &&
errno != EWOULDBLOCK) errno != EWOULDBLOCK)
...@@ -2290,8 +2300,7 @@ ssh_packet_write_wait(struct ssh *ssh) ...@@ -2290,8 +2300,7 @@ ssh_packet_write_wait(struct ssh *ssh)
ms_to_timeval(&timeout, ms_remain); ms_to_timeval(&timeout, ms_remain);
gettimeofday(&start, NULL); gettimeofday(&start, NULL);
} }
if ((ret = select(state->connection_out + 1, if ((ret = nx_proxy_select(state->connection_out + 1, NULL, setp, NULL, NULL)) >= 0)
NULL, setp, NULL, timeoutp)) >= 0)
break; break;
if (errno != EAGAIN && errno != EINTR && if (errno != EAGAIN && errno != EINTR &&
errno != EWOULDBLOCK) errno != EWOULDBLOCK)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment