diff options
author | Damien Miller <djm@mindrot.org> | 2004-06-15 10:35:30 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2004-06-15 10:35:30 +1000 |
commit | 232711f6dbc107711b3957bfa2fd798aec702241 (patch) | |
tree | 2dfcd276712caa022fd8aa2f3c1319c13660fdd7 /ssh-keyscan.c | |
parent | 0e220dbfbcc9fe252e8f1f4890dbfa415aad35db (diff) |
- djm@cvs.openbsd.org 2004/06/14 01:44:39
[channels.c clientloop.c misc.c misc.h packet.c ssh-agent.c ssh-keyscan.c]
[sshd.c]
set_nonblock() instead of fnctl(...,O_NONBLOCK); "looks sane" deraadt@
Diffstat (limited to 'ssh-keyscan.c')
-rw-r--r-- | ssh-keyscan.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ssh-keyscan.c b/ssh-keyscan.c index c4a2414b1..01615b5c3 100644 --- a/ssh-keyscan.c +++ b/ssh-keyscan.c | |||
@@ -7,7 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include "includes.h" | 9 | #include "includes.h" |
10 | RCSID("$OpenBSD: ssh-keyscan.c,v 1.48 2004/06/13 12:53:24 djm Exp $"); | 10 | RCSID("$OpenBSD: ssh-keyscan.c,v 1.49 2004/06/14 01:44:39 djm Exp $"); |
11 | 11 | ||
12 | #include "openbsd-compat/sys-queue.h" | 12 | #include "openbsd-compat/sys-queue.h" |
13 | 13 | ||
@@ -397,8 +397,8 @@ tcpconnect(char *host) | |||
397 | error("socket: %s", strerror(errno)); | 397 | error("socket: %s", strerror(errno)); |
398 | continue; | 398 | continue; |
399 | } | 399 | } |
400 | if (fcntl(s, F_SETFL, O_NONBLOCK) < 0) | 400 | if (set_nonblock(s) == -1) |
401 | fatal("F_SETFL: %s", strerror(errno)); | 401 | fatal("%s: set_nonblock(%d)", __func__, s); |
402 | if (connect(s, ai->ai_addr, ai->ai_addrlen) < 0 && | 402 | if (connect(s, ai->ai_addr, ai->ai_addrlen) < 0 && |
403 | errno != EINPROGRESS) | 403 | errno != EINPROGRESS) |
404 | error("connect (`%s'): %s", host, strerror(errno)); | 404 | error("connect (`%s'): %s", host, strerror(errno)); |