aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2013-02-11 21:35:50 +0100
committerAndreas Schneider <asn@cryptomilk.org>2013-02-27 08:07:44 +0100
commit5826cb6ab2415d8ddfd9ae7dd4b80ec53376e0f4 (patch)
tree0afabdc9cfc75718d566394a905d53607661b749
parentbbdef245a18bc8a0e543a8d956cbb81be9316dd5 (diff)
downloadlibssh-5826cb6ab2415d8ddfd9ae7dd4b80ec53376e0f4.tar.gz
libssh-5826cb6ab2415d8ddfd9ae7dd4b80ec53376e0f4.tar.xz
libssh-5826cb6ab2415d8ddfd9ae7dd4b80ec53376e0f4.zip
poll: return error on poll() when pollset is empty
(cherry picked from commit 222a0d78ca5c272ea109e847d62cf12674dd875f)
-rw-r--r--src/poll.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/poll.c b/src/poll.c
index 53c6b5c4..ecb38d8e 100644
--- a/src/poll.c
+++ b/src/poll.c
@@ -581,7 +581,7 @@ int ssh_poll_ctx_dopoll(ssh_poll_ctx ctx, int timeout) {
int revents;
if (!ctx->polls_used)
- return 0;
+ return SSH_ERROR;
rc = ssh_poll(ctx->pollfds, ctx->polls_used, timeout);
if(rc < 0)