From 5826cb6ab2415d8ddfd9ae7dd4b80ec53376e0f4 Mon Sep 17 00:00:00 2001 From: Aris Adamantiadis Date: Mon, 11 Feb 2013 21:35:50 +0100 Subject: [PATCH] poll: return error on poll() when pollset is empty (cherry picked from commit 222a0d78ca5c272ea109e847d62cf12674dd875f) --- src/poll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)