summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2003-01-10 21:45:12 +1100
committerDamien Miller <djm@mindrot.org>2003-01-10 21:45:12 +1100
commitb46b9f322d82a7c912e6e15dbd8a73261acf2991 (patch)
tree843b6e8ad5043a9ff1e37fbfa4df11881a2aaddd
parent86b781c179911d609bd0e3cfa3992f510cd56413 (diff)
- djm@cvs.openbsd.org 2003/01/10 10:32:54
[channels.c] hush socket() errors, except last. Fixes mindrot bug #408; ok markus@
-rw-r--r--ChangeLog5
-rw-r--r--channels.c7
2 files changed, 9 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 26afd0929..e45a2cd03 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -22,6 +22,9 @@
22 Don't ftruncate after write error, creating sparse files of 22 Don't ftruncate after write error, creating sparse files of
23 incorrect length 23 incorrect length
24 mindrot bug #403, reported by rusr@cup.hp.com; ok markus@ 24 mindrot bug #403, reported by rusr@cup.hp.com; ok markus@
25 - djm@cvs.openbsd.org 2003/01/10 10:32:54
26 [channels.c]
27 hush socket() errors, except last. Fixes mindrot bug #408; ok markus@
25 28
2620030108 2920030108
27 - (djm) Sync openbsd-compat/ with OpenBSD -current 30 - (djm) Sync openbsd-compat/ with OpenBSD -current
@@ -990,4 +993,4 @@
990 save auth method before monitor_reset_key_state(); bugzilla bug #284; 993 save auth method before monitor_reset_key_state(); bugzilla bug #284;
991 ok provos@ 994 ok provos@
992 995
993$Id: ChangeLog,v 1.2562 2003/01/10 10:44:48 djm Exp $ 996$Id: ChangeLog,v 1.2563 2003/01/10 10:45:12 djm Exp $
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)