Lines 1-8
Link Here
|
1 |
|
1 |
|
2 |
$FreeBSD: ports/net-mgmt/ehnt/files/patch-ehntserv.c,v 1.1 2002/11/16 14:36:35 edwin Exp $ |
2 |
$FreeBSD$ |
3 |
|
3 |
|
4 |
--- ehntserv.c.orig Thu Oct 4 22:18:29 2001 |
4 |
--- ehntserv.c.orig Thu Oct 4 22:18:29 2001 |
5 |
+++ ehntserv.c Thu Nov 14 22:18:40 2002 |
5 |
+++ ehntserv.c Fri May 30 14:16:22 2003 |
6 |
@@ -33,8 +33,8 @@ |
6 |
@@ -33,8 +33,8 @@ |
7 |
#define MAXCLIENTS 256 |
7 |
#define MAXCLIENTS 256 |
8 |
#define MAXPACKET 8192 |
8 |
#define MAXPACKET 8192 |
Lines 120-130
Link Here
|
120 |
for (i=0; i<MAXCLIENTS; i++) { |
120 |
for (i=0; i<MAXCLIENTS; i++) { |
121 |
if (l_clients[i] > 0) { |
121 |
if (l_clients[i] > 0) { |
122 |
if (FD_ISSET(l_clients[i],&write_fds)) { |
122 |
if (FD_ISSET(l_clients[i],&write_fds)) { |
123 |
@@ -220,9 +230,9 @@ |
123 |
@@ -215,14 +225,14 @@ |
|
|
124 |
if (FD_ISSET(l_fd,&read_fds)) { /*we have a new TCP client*/ |
125 |
int l_connfd,new_index=-1; |
126 |
socklen_t l_addrlen; |
127 |
- struct sockaddr * l_cliaddr; |
128 |
+ struct sockaddr l_cliaddr; |
129 |
|
124 |
/* printf("incoming connection on tcp 4444\n");*/ |
130 |
/* printf("incoming connection on tcp 4444\n");*/ |
125 |
l_addrlen=sizeof(l_cliaddr); |
131 |
l_addrlen=sizeof(l_cliaddr); |
126 |
if ( (l_connfd = accept(l_fd,(struct sockaddr *) l_cliaddr, &l_addrlen)) < 0) |
132 |
- if ( (l_connfd = accept(l_fd,(struct sockaddr *) l_cliaddr, &l_addrlen)) < 0) |
127 |
- { log_error("accept error"); exit(0); } |
133 |
- { log_error("accept error"); exit(0); } |
|
|
134 |
+ if ( (l_connfd = accept(l_fd, &l_cliaddr, &l_addrlen)) < 0) |
128 |
+ { log_error("accept error"); exit(1); } |
135 |
+ { log_error("accept error"); exit(1); } |
129 |
|
136 |
|
130 |
- SetTCPOpts(l_connfd); |
137 |
- SetTCPOpts(l_connfd); |