aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2011-04-15 19:14:15 +0200
committerAndreas Schneider <asn@cryptomilk.org>2011-04-15 19:14:15 +0200
commit8b95328b1b397f425bf30d51da6a5c12a458f3ff (patch)
treea41800cdd5b32b36c708e764d6f64c15e38a0129 /src
parent644145a88caf0ff9cbfa16902c775b922578357b (diff)
downloadlibssh-8b95328b1b397f425bf30d51da6a5c12a458f3ff.tar.gz
libssh-8b95328b1b397f425bf30d51da6a5c12a458f3ff.tar.xz
libssh-8b95328b1b397f425bf30d51da6a5c12a458f3ff.zip
poll: Fix poll input events.
bug#38
Diffstat (limited to 'src')
-rw-r--r--src/poll.c4
-rw-r--r--src/session.c2
-rw-r--r--src/socket.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/poll.c b/src/poll.c
index 094d8397..ed2924c6 100644
--- a/src/poll.c
+++ b/src/poll.c
@@ -303,7 +303,7 @@ int ssh_poll(ssh_pollfd_t *fds, nfds_t nfds, int timeout) {
*
* @param fd Socket that will be polled.
* @param events Poll events that will be monitored for the socket. i.e.
- * POLLIN, POLLPRI, POLLOUT, POLLERR, POLLHUP, POLLNVAL
+ * POLLIN, POLLPRI, POLLOUT
* @param cb Function to be called if any of the events are set.
* The prototype of cb is:
* int (*ssh_poll_callback)(ssh_poll_handle p, socket_t fd,
@@ -750,7 +750,7 @@ static int ssh_event_fd_wrapper_callback(ssh_poll_handle p, socket_t fd, int rev
* @param event The ssh_event
* @param fd Socket that will be polled.
* @param events Poll events that will be monitored for the socket. i.e.
- * POLLIN, POLLPRI, POLLOUT, POLLERR, POLLHUP, POLLNVAL
+ * POLLIN, POLLPRI, POLLOUT
* @param cb Function to be called if any of the events are set.
* The prototype of cb is:
* int (*ssh_event_callback)(socket_t fd, int revents,
diff --git a/src/session.c b/src/session.c
index 4623b4b5..18688c60 100644
--- a/src/session.c
+++ b/src/session.c
@@ -421,7 +421,7 @@ int ssh_handle_packets(ssh_session session, int timeout) {
spoll_in=ssh_socket_get_poll_handle_in(session->socket);
spoll_out=ssh_socket_get_poll_handle_out(session->socket);
if(session->server)
- ssh_poll_add_events(spoll_in, POLLIN | POLLERR);
+ ssh_poll_add_events(spoll_in, POLLIN);
ctx=ssh_poll_get_ctx(spoll_in);
if(ctx==NULL){
ctx=ssh_poll_get_default_ctx(session);
diff --git a/src/socket.c b/src/socket.c
index fa7ed526..5097be9e 100644
--- a/src/socket.c
+++ b/src/socket.c
@@ -270,7 +270,7 @@ int ssh_socket_pollcallback(struct ssh_poll_handle_struct *p, socket_t fd, int r
if(s->state == SSH_SOCKET_CONNECTING){
ssh_log(s->session,SSH_LOG_PACKET,"Received POLLOUT in connecting state");
s->state = SSH_SOCKET_CONNECTED;
- ssh_poll_set_events(p,POLLOUT | POLLIN | POLLERR);
+ ssh_poll_set_events(p,POLLOUT | POLLIN);
ssh_sock_set_blocking(ssh_socket_get_fd_in(s));
if(s->callbacks && s->callbacks->connected)
s->callbacks->connected(SSH_SOCKET_CONNECTED_OK,0,s->callbacks->userdata);