From 4479b4aded35f52a49f20053ed81161037818cb6 Mon Sep 17 00:00:00 2001 From: Aris Adamantiadis Date: Tue, 12 Dec 2006 16:32:34 +0000 Subject: norbert's patches + strange typo in packet_nonblocking_flush() git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@97 7dcaeef0-15fb-0310-b436-a5af3365683c --- libssh/client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libssh/client.c') diff --git a/libssh/client.c b/libssh/client.c index da4636a2..9af4e627 100644 --- a/libssh/client.c +++ b/libssh/client.c @@ -36,7 +36,7 @@ char *ssh_get_banner(SSH_SESSION *session){ char buffer[128]; int i = 0; while (i < 127) { - if(session->fd >=0 && read(session->fd, &buffer[i], 1)<=0){ + if(session->fd <0 || read(session->fd, &buffer[i], 1)<=0){ ssh_set_error(session,SSH_FATAL,"Remote host closed connection"); return NULL; } -- cgit v1.2.3