summaryrefslogtreecommitdiff
path: root/channels.c
diff options
context:
space:
mode:
Diffstat (limited to 'channels.c')
-rw-r--r--channels.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/channels.c b/channels.c
index 2fb22f7c4..ea1d46c21 100644
--- a/channels.c
+++ b/channels.c
@@ -39,7 +39,7 @@
39 */ 39 */
40 40
41#include "includes.h" 41#include "includes.h"
42RCSID("$OpenBSD: channels.c,v 1.185 2003/01/01 18:08:52 markus Exp $"); 42RCSID("$OpenBSD: channels.c,v 1.186 2003/01/10 10:32:54 djm Exp $");
43 43
44#include "ssh.h" 44#include "ssh.h"
45#include "ssh1.h" 45#include "ssh1.h"
@@ -2281,7 +2281,10 @@ connect_to(const char *host, u_short port)
2281 } 2281 }
2282 sock = socket(ai->ai_family, SOCK_STREAM, 0); 2282 sock = socket(ai->ai_family, SOCK_STREAM, 0);
2283 if (sock < 0) { 2283 if (sock < 0) {
2284 error("socket: %.100s", strerror(errno)); 2284 if (ai->ai_next == NULL)
2285 error("socket: %.100s", strerror(errno));
2286 else
2287 verbose("socket: %.100s", strerror(errno));
2285 continue; 2288 continue;
2286 } 2289 }
2287 if (fcntl(sock, F_SETFL, O_NONBLOCK) < 0) 2290 if (fcntl(sock, F_SETFL, O_NONBLOCK) < 0)