Hi,
Seems this patch is forgotten... Aris, is it ok to push to git? Thanks.
Vic
-------- Original Message --------
Subject: [PATCH] socket.c: fixed uninitialized fd->revents member in
ssh_socket_poll() function
Date: Fri, 22 Oct 2010 19:59:26 +0800
From: Vic Lee <ll...@163.com>
Reply-To: libssh@libssh.org
To: libssh@libssh.org
Hi,
The attached patch is simple and self-explained. It applies to v0-4 branch.
Ths issue was actually quite serious. Intermittently it caused
channel_select() enter in an infinite loop, took 100% CPU and never return.
Vic
>From ef867aff790ea33adaff087257f4a265eb2cc017 Mon Sep 17 00:00:00 2001
From: Vic Lee <ll...@163.com>
Date: Fri, 22 Oct 2010 13:08:13 +0800
Subject: [PATCH] socket.c: fixed uninitialized fd->revents member in ssh_socket_poll() function
Signed-off-by: Vic Lee <ll...@163.com>
---
libssh/socket.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/libssh/socket.c b/libssh/socket.c
index c8fd00f..817128c 100644
--- a/libssh/socket.c
+++ b/libssh/socket.c
@@ -492,6 +492,7 @@ int ssh_socket_poll(struct socket *s, int *writeable, int *except) {
fd->fd = s->fd;
fd->events = 0;
+ fd->revents = 0;
if (!s->data_to_read) {
fd->events |= POLLIN;
--
1.7.1