зеркало из https://github.com/Azure/sonic-openssh.git
- stevesk@cvs.openbsd.org 2002/02/27 21:23:13
[canohost.c channels.c packet.c sshd.c] remove unneeded casts in [gs]etsockopt(); ok markus@
This commit is contained in:
Родитель
e86de51afb
Коммит
733a2351f5
|
@ -14,6 +14,9 @@
|
|||
- stevesk@cvs.openbsd.org 2002/02/26 20:03:51
|
||||
[misc.c]
|
||||
use socklen_t
|
||||
- stevesk@cvs.openbsd.org 2002/02/27 21:23:13
|
||||
[canohost.c channels.c packet.c sshd.c]
|
||||
remove unneeded casts in [gs]etsockopt(); ok markus@
|
||||
|
||||
20020226
|
||||
- (tim) Bug 12 [configure.ac] add sys/bitypes.h to int64_t tests
|
||||
|
@ -7745,4 +7748,4 @@
|
|||
- Wrote replacements for strlcpy and mkdtemp
|
||||
- Released 1.0pre1
|
||||
|
||||
$Id: ChangeLog,v 1.1894 2002/03/05 01:28:14 mouring Exp $
|
||||
$Id: ChangeLog,v 1.1895 2002/03/05 01:31:28 mouring Exp $
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
*/
|
||||
|
||||
#include "includes.h"
|
||||
RCSID("$OpenBSD: canohost.c,v 1.30 2002/01/29 14:32:03 markus Exp $");
|
||||
RCSID("$OpenBSD: canohost.c,v 1.31 2002/02/27 21:23:13 stevesk Exp $");
|
||||
|
||||
#include "packet.h"
|
||||
#include "xmalloc.h"
|
||||
|
@ -154,7 +154,7 @@ check_ip_options(int socket, char *ipaddr)
|
|||
else
|
||||
ipproto = IPPROTO_IP;
|
||||
option_size = sizeof(options);
|
||||
if (getsockopt(socket, ipproto, IP_OPTIONS, (void *)options,
|
||||
if (getsockopt(socket, ipproto, IP_OPTIONS, options,
|
||||
&option_size) >= 0 && option_size != 0) {
|
||||
text[0] = '\0';
|
||||
for (i = 0; i < option_size; i++)
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
*/
|
||||
|
||||
#include "includes.h"
|
||||
RCSID("$OpenBSD: channels.c,v 1.169 2002/02/24 19:59:42 stevesk Exp $");
|
||||
RCSID("$OpenBSD: channels.c,v 1.170 2002/02/27 21:23:13 stevesk Exp $");
|
||||
|
||||
#include "ssh.h"
|
||||
#include "ssh1.h"
|
||||
|
@ -1184,8 +1184,7 @@ channel_post_connecting(Channel *c, fd_set * readset, fd_set * writeset)
|
|||
socklen_t sz = sizeof(err);
|
||||
|
||||
if (FD_ISSET(c->sock, writeset)) {
|
||||
if (getsockopt(c->sock, SOL_SOCKET, SO_ERROR, (char *)&err,
|
||||
&sz) < 0) {
|
||||
if (getsockopt(c->sock, SOL_SOCKET, SO_ERROR, &err, &sz) < 0) {
|
||||
err = errno;
|
||||
error("getsockopt SO_ERROR failed");
|
||||
}
|
||||
|
@ -2036,10 +2035,10 @@ channel_setup_fwd_listener(int type, const char *listen_addr, u_short listen_por
|
|||
* Set socket options. We would like the socket to disappear
|
||||
* as soon as it has been closed for whatever reason.
|
||||
*/
|
||||
setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (void *)&on, sizeof(on));
|
||||
setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on));
|
||||
linger.l_onoff = 1;
|
||||
linger.l_linger = 5;
|
||||
setsockopt(sock, SOL_SOCKET, SO_LINGER, (void *)&linger, sizeof(linger));
|
||||
setsockopt(sock, SOL_SOCKET, SO_LINGER, &linger, sizeof(linger));
|
||||
debug("Local forwarding listening on %s port %s.", ntop, strport);
|
||||
|
||||
/* Bind the socket to the address. */
|
||||
|
|
6
packet.c
6
packet.c
|
@ -37,7 +37,7 @@
|
|||
*/
|
||||
|
||||
#include "includes.h"
|
||||
RCSID("$OpenBSD: packet.c,v 1.89 2002/02/24 16:58:32 markus Exp $");
|
||||
RCSID("$OpenBSD: packet.c,v 1.90 2002/02/27 21:23:13 stevesk Exp $");
|
||||
|
||||
#include "xmalloc.h"
|
||||
#include "buffer.h"
|
||||
|
@ -1218,7 +1218,7 @@ packet_set_interactive(int interactive)
|
|||
#if defined(IP_TOS) && !defined(IP_TOS_IS_BROKEN)
|
||||
if (packet_connection_is_ipv4()) {
|
||||
if (setsockopt(connection_in, IPPROTO_IP, IP_TOS,
|
||||
(void *) &lowdelay, sizeof(lowdelay)) < 0)
|
||||
&lowdelay, sizeof(lowdelay)) < 0)
|
||||
error("setsockopt IPTOS_LOWDELAY: %.100s",
|
||||
strerror(errno));
|
||||
}
|
||||
|
@ -1230,7 +1230,7 @@ packet_set_interactive(int interactive)
|
|||
* IPTOS_THROUGHPUT.
|
||||
*/
|
||||
#if defined(IP_TOS) && !defined(IP_TOS_IS_BROKEN)
|
||||
if (setsockopt(connection_in, IPPROTO_IP, IP_TOS, (void *) &throughput,
|
||||
if (setsockopt(connection_in, IPPROTO_IP, IP_TOS, &throughput,
|
||||
sizeof(throughput)) < 0)
|
||||
error("setsockopt IPTOS_THROUGHPUT: %.100s", strerror(errno));
|
||||
#endif
|
||||
|
|
10
sshd.c
10
sshd.c
|
@ -40,7 +40,7 @@
|
|||
*/
|
||||
|
||||
#include "includes.h"
|
||||
RCSID("$OpenBSD: sshd.c,v 1.227 2002/02/24 16:09:52 stevesk Exp $");
|
||||
RCSID("$OpenBSD: sshd.c,v 1.228 2002/02/27 21:23:13 stevesk Exp $");
|
||||
|
||||
#include <openssl/dh.h>
|
||||
#include <openssl/bn.h>
|
||||
|
@ -900,11 +900,11 @@ main(int ac, char **av)
|
|||
* close.
|
||||
*/
|
||||
setsockopt(listen_sock, SOL_SOCKET, SO_REUSEADDR,
|
||||
(void *) &on, sizeof(on));
|
||||
&on, sizeof(on));
|
||||
linger.l_onoff = 1;
|
||||
linger.l_linger = 5;
|
||||
setsockopt(listen_sock, SOL_SOCKET, SO_LINGER,
|
||||
(void *) &linger, sizeof(linger));
|
||||
&linger, sizeof(linger));
|
||||
|
||||
debug("Bind to port %s on %s.", strport, ntop);
|
||||
|
||||
|
@ -1150,11 +1150,11 @@ main(int ac, char **av)
|
|||
/* setsockopt(sock_in, SOL_SOCKET, SO_REUSEADDR, (void *)&on, sizeof(on)); */
|
||||
linger.l_onoff = 1;
|
||||
linger.l_linger = 5;
|
||||
setsockopt(sock_in, SOL_SOCKET, SO_LINGER, (void *) &linger, sizeof(linger));
|
||||
setsockopt(sock_in, SOL_SOCKET, SO_LINGER, &linger, sizeof(linger));
|
||||
|
||||
/* Set keepalives if requested. */
|
||||
if (options.keepalives &&
|
||||
setsockopt(sock_in, SOL_SOCKET, SO_KEEPALIVE, (void *)&on,
|
||||
setsockopt(sock_in, SOL_SOCKET, SO_KEEPALIVE, &on,
|
||||
sizeof(on)) < 0)
|
||||
error("setsockopt SO_KEEPALIVE: %.100s", strerror(errno));
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче