From 09139ef0657be7a50d48cfc795aace73758b94cf Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 8 Dec 2011 10:54:04 +0100 Subject: [PATCH] ssh2_exec: skip error outputs for EAGAIN Since the example uses non-blocking mode, it will just flood the output with this "nonsense" error. --- example/ssh2_exec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/example/ssh2_exec.c b/example/ssh2_exec.c index b45cd41..e5b151d 100644 --- a/example/ssh2_exec.c +++ b/example/ssh2_exec.c @@ -264,7 +264,9 @@ int main(int argc, char *argv[]) fprintf(stderr, "\n"); } else { - fprintf(stderr, "libssh2_channel_read returned %d\n", rc); + if( rc != LIBSSH2_ERROR_EAGAIN ) + /* no need to output this for the EAGAIN case */ + fprintf(stderr, "libssh2_channel_read returned %d\n", rc); } } while( rc > 0 );