summaryrefslogtreecommitdiff
path: root/channels.c
diff options
context:
space:
mode:
Diffstat (limited to 'channels.c')
-rw-r--r--channels.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/channels.c b/channels.c
index 7be577838..0156e9cb8 100644
--- a/channels.c
+++ b/channels.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: channels.c,v 1.284 2008/07/12 04:52:50 djm Exp $ */ 1/* $OpenBSD: channels.c,v 1.285 2008/07/13 22:13:07 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1210,7 +1210,7 @@ static void
1210channel_post_x11_listener(Channel *c, fd_set *readset, fd_set *writeset) 1210channel_post_x11_listener(Channel *c, fd_set *readset, fd_set *writeset)
1211{ 1211{
1212 Channel *nc; 1212 Channel *nc;
1213 struct sockaddr addr; 1213 struct sockaddr_storage addr;
1214 int newsock; 1214 int newsock;
1215 socklen_t addrlen; 1215 socklen_t addrlen;
1216 char buf[16384], *remote_ipaddr; 1216 char buf[16384], *remote_ipaddr;
@@ -1219,7 +1219,7 @@ channel_post_x11_listener(Channel *c, fd_set *readset, fd_set *writeset)
1219 if (FD_ISSET(c->sock, readset)) { 1219 if (FD_ISSET(c->sock, readset)) {
1220 debug("X11 connection requested."); 1220 debug("X11 connection requested.");
1221 addrlen = sizeof(addr); 1221 addrlen = sizeof(addr);
1222 newsock = accept(c->sock, &addr, &addrlen); 1222 newsock = accept(c->sock, (struct sockaddr *)&addr, &addrlen);
1223 if (c->single_connection) { 1223 if (c->single_connection) {
1224 debug2("single_connection: closing X11 listener."); 1224 debug2("single_connection: closing X11 listener.");
1225 channel_close_fd(&c->sock); 1225 channel_close_fd(&c->sock);
@@ -1336,7 +1336,7 @@ static void
1336channel_post_port_listener(Channel *c, fd_set *readset, fd_set *writeset) 1336channel_post_port_listener(Channel *c, fd_set *readset, fd_set *writeset)
1337{ 1337{
1338 Channel *nc; 1338 Channel *nc;
1339 struct sockaddr addr; 1339 struct sockaddr_storage addr;
1340 int newsock, nextstate; 1340 int newsock, nextstate;
1341 socklen_t addrlen; 1341 socklen_t addrlen;
1342 char *rtype; 1342 char *rtype;
@@ -1360,7 +1360,7 @@ channel_post_port_listener(Channel *c, fd_set *readset, fd_set *writeset)
1360 } 1360 }
1361 1361
1362 addrlen = sizeof(addr); 1362 addrlen = sizeof(addr);
1363 newsock = accept(c->sock, &addr, &addrlen); 1363 newsock = accept(c->sock, (struct sockaddr *)&addr, &addrlen);
1364 if (newsock < 0) { 1364 if (newsock < 0) {
1365 error("accept: %.100s", strerror(errno)); 1365 error("accept: %.100s", strerror(errno));
1366 return; 1366 return;
@@ -1395,12 +1395,12 @@ channel_post_auth_listener(Channel *c, fd_set *readset, fd_set *writeset)
1395{ 1395{
1396 Channel *nc; 1396 Channel *nc;
1397 int newsock; 1397 int newsock;
1398 struct sockaddr addr; 1398 struct sockaddr_storage addr;
1399 socklen_t addrlen; 1399 socklen_t addrlen;
1400 1400
1401 if (FD_ISSET(c->sock, readset)) { 1401 if (FD_ISSET(c->sock, readset)) {
1402 addrlen = sizeof(addr); 1402 addrlen = sizeof(addr);
1403 newsock = accept(c->sock, &addr, &addrlen); 1403 newsock = accept(c->sock, (struct sockaddr *)&addr, &addrlen);
1404 if (newsock < 0) { 1404 if (newsock < 0) {
1405 error("accept from auth socket: %.100s", strerror(errno)); 1405 error("accept from auth socket: %.100s", strerror(errno));
1406 return; 1406 return;