diff options
Diffstat (limited to 'channels.c')
-rw-r--r-- | channels.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/channels.c b/channels.c index 325f278f0..d5a24311c 100644 --- a/channels.c +++ b/channels.c | |||
@@ -39,7 +39,7 @@ | |||
39 | */ | 39 | */ |
40 | 40 | ||
41 | #include "includes.h" | 41 | #include "includes.h" |
42 | RCSID("$OpenBSD: channels.c,v 1.169 2002/02/24 19:59:42 stevesk Exp $"); | 42 | RCSID("$OpenBSD: channels.c,v 1.170 2002/02/27 21:23:13 stevesk Exp $"); |
43 | 43 | ||
44 | #include "ssh.h" | 44 | #include "ssh.h" |
45 | #include "ssh1.h" | 45 | #include "ssh1.h" |
@@ -1184,8 +1184,7 @@ channel_post_connecting(Channel *c, fd_set * readset, fd_set * writeset) | |||
1184 | socklen_t sz = sizeof(err); | 1184 | socklen_t sz = sizeof(err); |
1185 | 1185 | ||
1186 | if (FD_ISSET(c->sock, writeset)) { | 1186 | if (FD_ISSET(c->sock, writeset)) { |
1187 | if (getsockopt(c->sock, SOL_SOCKET, SO_ERROR, (char *)&err, | 1187 | if (getsockopt(c->sock, SOL_SOCKET, SO_ERROR, &err, &sz) < 0) { |
1188 | &sz) < 0) { | ||
1189 | err = errno; | 1188 | err = errno; |
1190 | error("getsockopt SO_ERROR failed"); | 1189 | error("getsockopt SO_ERROR failed"); |
1191 | } | 1190 | } |
@@ -2036,10 +2035,10 @@ channel_setup_fwd_listener(int type, const char *listen_addr, u_short listen_por | |||
2036 | * Set socket options. We would like the socket to disappear | 2035 | * Set socket options. We would like the socket to disappear |
2037 | * as soon as it has been closed for whatever reason. | 2036 | * as soon as it has been closed for whatever reason. |
2038 | */ | 2037 | */ |
2039 | setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (void *)&on, sizeof(on)); | 2038 | setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)); |
2040 | linger.l_onoff = 1; | 2039 | linger.l_onoff = 1; |
2041 | linger.l_linger = 5; | 2040 | linger.l_linger = 5; |
2042 | setsockopt(sock, SOL_SOCKET, SO_LINGER, (void *)&linger, sizeof(linger)); | 2041 | setsockopt(sock, SOL_SOCKET, SO_LINGER, &linger, sizeof(linger)); |
2043 | debug("Local forwarding listening on %s port %s.", ntop, strport); | 2042 | debug("Local forwarding listening on %s port %s.", ntop, strport); |
2044 | 2043 | ||
2045 | /* Bind the socket to the address. */ | 2044 | /* Bind the socket to the address. */ |