version 1.5 | | version 1.6 |
---|
| | |
| | |
/* | | /* |
* static char *rcsid_loop_c = | | * static char *rcsid_loop_c = |
* "$Id: loop.c,v 1.5 2000/12/13 07:08:17 cvs Exp $"; | | * "$Id: loop.c,v 1.6 2000/12/17 07:26:40 cvs Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
free_newsocket(&init_sockets[i]); | | free_newsocket(&init_sockets[i]); |
init_sockets[i].status = Ns_Avail; | | init_sockets[i].status = Ns_Avail; |
socket_info.nconns--; | | socket_info.nconns--; |
for (j=i; j<socket_info.nconns; j++) | | |
init_sockets[j] = init_sockets[j+1]; | | |
if ((socket_info.nconns+1) < socket_info.allocated_sockets) | | |
init_sockets[socket_info.nconns+1].status = Ns_Avail; | | |
} else if (init_sockets[i].status != Ns_Avail){ | | } else if (init_sockets[i].status != Ns_Avail){ |
FD_SET(init_sockets[i].fd, &tmp_read); | | FD_SET(init_sockets[i].fd, &tmp_read); |
FD_SET(init_sockets[i].fd, &tmp_write); | | FD_SET(init_sockets[i].fd, &tmp_write); |
| | |
int j; | | int j; |
| | |
free_newsocket(&init_sockets[i]); | | free_newsocket(&init_sockets[i]); |
| | init_sockets[i].status = Ns_Avail; |
socket_info.nconns--; | | socket_info.nconns--; |
for (j=i; j<socket_info.nconns; j++) | | |
init_sockets[j] = init_sockets[j+1]; | | |
if ((socket_info.nconns+1) < socket_info.allocated_sockets) | | |
init_sockets[socket_info.nconns+1].status = Ns_Avail; | | |
continue; | | continue; |
} | | } |
if (FD_ISSET(init_sockets[i].fd, &tmp_read)) { | | if (FD_ISSET(init_sockets[i].fd, &tmp_read)) { |
| | |
init_sockets[i].can_write=1; | | init_sockets[i].can_write=1; |
} | | } |
} | | } |
| | |
/* This does roughly the same thing, but for the players now */ | | /* This does roughly the same thing, but for the players now */ |
for (pl=first_player; pl!=NULL; pl=next) { | | for (pl=first_player; pl!=NULL; pl=next) { |
| | |