summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2013-02-11 21:35:50 +0100
committerAris Adamantiadis <aris@0xbadc0de.be>2013-02-26 23:52:25 +0100
commit222a0d78ca5c272ea109e847d62cf12674dd875f (patch)
treebb10108a0289129ae2cb385ac23cdf1a2f26bde9 /src
parente471aa4e0b9601a9f62b084634f188787dbdc10f (diff)
downloadlibssh-222a0d78ca5c272ea109e847d62cf12674dd875f.tar.gz
libssh-222a0d78ca5c272ea109e847d62cf12674dd875f.tar.xz
libssh-222a0d78ca5c272ea109e847d62cf12674dd875f.zip
poll: return error on poll() when pollset is empty
Diffstat (limited to 'src')
-rw-r--r--src/poll.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/poll.c b/src/poll.c
index 5a7d85d..932c491 100644
--- a/src/poll.c
+++ b/src/poll.c
@@ -586,7 +586,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)