gcc -c -Wall -O -ggdb accounts.c -o obj/accounts.o
In file included from merc.h:2638,
from accounts.c:18:
synthesize.h:97: error: syntax error before "FileData"
In file included from merc.h:2639,
from accounts.c:18:
cooking.h:52: error: syntax error before "FileData"
In file included from merc.h:2948,
from accounts.c:18:
chocobo.h:291: error: syntax error before "FileData"
chocobo.h:292: error: syntax error before "FileData"
In file included from accounts.c:18:
merc.h:4438: error: syntax error before '*' token
merc.h:4735: error: syntax error before '*' token
merc.h:4736: error: syntax error before '*' token
merc.h:4737: error: syntax error before '*' token
merc.h:4738: error: syntax error before '*' token
long fread_flag args( ( FileData *fp ) );
char * fread_string args( ( FileData *fp ) );
char * fread_string_eol args(( FileData *fp ) );
void fread_to_eol args( ( FileData *fp ) );
void fwrite_stable (CHAR_DATA * ch, FileData * fp);
void fread_stable (CHAR_DATA * ch, FileData * fp);
==28820==
==28820== Open AF_INET socket 4: 0.0.0.0:4001 <-> unbound
==28820== at 0x4154F42: socket (in /lib/libc-2.7.so)
==28820== by 0x80E9AA7: init_socket (comm.c:491)
==28820== by 0x80E9A0D: main (comm.c:460)
int main( int argc, char **argv )
{
struct timeval now_time;
bool fCopyOver = FALSE;
/*
* Memory debugging if needed.
*/
#if defined(MALLOC_DEBUG)
malloc_debug( 2 );
#endif
/*
* Init time.
*/
gettimeofday( &now_time, NULL );
current_time = (time_t) now_time.tv_sec;
strcpy( str_boot_time, ctime( ¤t_time ) );
/*
* Macintosh console initialization.
*/
#if defined(macintosh)
console_options.nrows = 31;
cshow( stdout );
csetmode( C_RAW, stdin );
cecho2file( "log file", 1, stderr );
#endif
/*
* Reserve one channel for our use.
*/
if ( ( fpReserve = fopen( NULL_FILE, "r" ) ) == NULL )
{
perror( NULL_FILE );
exit( 1 );
}
/*
* Get the port number.
*/
port = 4000;
if ( argc > 1 )
{
if ( !is_number( argv[1] ) )
{
fprintf( stderr, "Usage: %s [port #]\n", argv[0] );
exit( 1 );
}
else if ( ( port = atoi( argv[1] ) ) <= 1024 )
{
fprintf( stderr, "Port number must be above 1024.\n" );
exit( 1 );
}
/* Are we recovering from a copyover? */
if (argv[2] && argv[2][0])
{
fCopyOver = TRUE;
control = atoi(argv[3]);
}
else
fCopyOver = FALSE;
}
/*
* Run the game.
*/
#if defined(macintosh) || defined(MSDOS)
boot_db();
log_string( "Merc is ready to rock." );
game_loop_mac_msdos( );
#endif
pulsenum = 1;
#if defined(unix)
if (!fCopyOver)
control = init_socket( port ); //<—– comm.c:460
boot_db();
sprintf( log_buf, "End of Time is now running on port %d.", port );
log_string( log_buf );
if (fCopyOver)
copyover_recover();
game_loop_unix( control );
close (control);
#endif
/*
* That's all, folks.
*/
log_string( "Normal termination of game." );
exit( 0 );
return 0;
}
#if defined(unix)
int init_socket( int port )
{
static struct sockaddr_in sa_zero;
struct sockaddr_in sa;
int x = 1;
int fd;
if ( ( fd = socket( AF_INET, SOCK_STREAM, 0 ) ) < 0 ) //<—– comm.c:491
{
perror( "Init_socket: socket" );
exit( 1 );
}
if ( setsockopt( fd, SOL_SOCKET, SO_REUSEADDR,
(char *) &x, sizeof(x) ) < 0 )
{
perror( "Init_socket: SO_REUSEADDR" );
close(fd);
exit( 1 );
}
#if defined(SO_DONTLINGER) && !defined(SYSV)
{
struct linger ld;
ld.l_onoff = 1;
ld.l_linger = 1000;
if ( setsockopt( fd, SOL_SOCKET, SO_DONTLINGER,
(char *) &ld, sizeof(ld) ) < 0 )
{
perror( "Init_socket: SO_DONTLINGER" );
close(fd);
exit( 1 );
}
}
#endif
sa = sa_zero;
sa.sin_family = AF_INET;
sa.sin_port = htons( port );
if ( bind( fd, (struct sockaddr *) &sa, sizeof(sa) ) < 0 )
{
perror("Init socket: bind" );
close(fd);
exit(1);
}
if ( listen( fd, 3 ) < 0 )
{
perror("Init socket: listen");
close(fd);
exit(1);
}
return fd;
}
#endif
void close_socket( DESCRIPTOR_DATA *dclose )
{
CHAR_DATA *ch;
char buf[MAX_STRING_LENGTH];
if ( dclose->outtop > 0 )
process_output( dclose, FALSE );
if ( dclose->snoop_by != NULL )
{
write_to_buffer( dclose->snoop_by,
"Your victim has left the game.\r\n", 0 );
}
{
DESCRIPTOR_DATA *d;
for ( d = descriptor_list; d != NULL; d = d->next )
{
if ( d->snoop_by == dclose )
d->snoop_by = NULL;
}
}
if ( ( ch = dclose->character ) != NULL )
{
sprintf( log_buf, "Closing link to %s.", ch->name );
log_string( log_buf );
if ( ch->pet && ch->pet->in_room == NULL )
{
char_to_room( ch->pet, get_room_index(ROOM_VNUM_LIMBO) );
extract_char( ch->pet, TRUE );
}
/* cut down on wiznet spam when rebooting */
if ( dclose->connected == CON_PLAYING && !merc_down)
{
char log_buf[MSL];
sprintf( log_buf, "Net death has claimed %s. (%ld)", ch->name,ch->in_room->vnum );
log_string( log_buf );
wiznet(log_buf,NULL,NULL,WIZ_LINKS,0,get_trust(ch));
act( "$n has lost $s link.", ch, NULL, NULL, TO_ROOM );
if (ch->actions != NULL)
{
DELAY * list, * next;
for (list = ch->actions; list != NULL; list = next)
{
next = list->next;
free_delay (list);
}
}
ch->actions = NULL;
ch->desc = NULL;
SET_BIT( ch->comm, COMM_LINKDEAD );
if (!IS_SET(ch->act,PLR_NOANNOUNCE) && !ch->incog_level && !ch->invis_level && !IS_SET( ch->comm, COMM_NOWHO))
{
sprintf(buf, "%s {wis now linkdead.", ch->name);
do_info(NULL,buf);
}
}
else
{
free_char(dclose->original ? dclose->original :
dclose->character );
}
}
if ( d_next == dclose )
d_next = d_next->next;
if ( dclose == descriptor_list )
{
descriptor_list = descriptor_list->next;
}
else
{
DESCRIPTOR_DATA *d;
for ( d = descriptor_list; d && d->next != dclose; d = d->next )
;
if ( d != NULL )
d->next = dclose->next;
else
bug( "Close_socket: dclose not found.", 0 );
}
ProtocolDestroy( dclose->pProtocol );
close( dclose->descriptor );
free_descriptor(dclose);
#if defined(MSDOS) || defined(macintosh)
exit(1);
#endif
return;
}
==28820==
==28820== Open AF_INET socket 4: 0.0.0.0:4001 <-> unbound
==28820== at 0x4154F42: socket (in /lib/libc-2.7.so)
==28820== by 0x80E9AA7: init_socket (comm.c:491)
==28820== by 0x80E9A0D: main (comm.c:460)
==3283== Open AF_INET socket 33: 66.221.0.71:4000 <-> 151.73.111.216:48936
==3283== at 0x4154A0C: accept (in /lib/libc-2.7.so)
==3283== by 0x80E9D58: init_descriptor (comm.c:1071)
==3283== by 0x80E9251: game_loop_unix (comm.c:798)
==3283== by 0x80E8F68: main (comm.c:469)
==3283==
==3283== Open AF_INET socket 32: 66.221.0.71:4000 <-> 151.73.111.216:48691
==3283== at 0x4154A0C: accept (in /lib/libc-2.7.so)
==3283== by 0x80E9D58: init_descriptor (comm.c:1071)
==3283== by 0x80E9251: game_loop_unix (comm.c:798)
==3283== by 0x80E8F68: main (comm.c:469)
==3283==
==3283== Open AF_INET socket 14: 66.221.0.71:4000 <-> 151.73.111.216:48442
==3283== at 0x4154A0C: accept (in /lib/libc-2.7.so)
==3283== by 0x80E9D58: init_descriptor (comm.c:1071)
==3283== by 0x80E9251: game_loop_unix (comm.c:798)
==3283== by 0x80E8F68: main (comm.c:469)
==3283==
==3283== Open AF_INET socket 29: 66.221.0.71:4000 <-> 80.179.17.18:37342
==3283== at 0x4154A0C: accept (in /lib/libc-2.7.so)
==3283== by 0x80E9D58: init_descriptor (comm.c:1071)
==3283== by 0x80E9251: game_loop_unix (comm.c:798)
==3283== by 0x80E8F68: main (comm.c:469)
==3283==
==3283== Open AF_INET socket 34: 66.221.0.71:4000 <-> 80.179.17.18:37216
==3283== at 0x4154A0C: accept (in /lib/libc-2.7.so)
==3283== by 0x80E9D58: init_descriptor (comm.c:1071)
==3283== by 0x80E9251: game_loop_unix (comm.c:798)
==3283== by 0x80E8F68: main (comm.c:469)
==3283==
==3283== Open AF_INET socket 30: 66.221.0.71:4000 <-> 80.179.17.18:37057
==3283== at 0x4154A0C: accept (in /lib/libc-2.7.so)
==3283== by 0x80E9D58: init_descriptor (comm.c:1071)
==3283== by 0x80E9251: game_loop_unix (comm.c:798)
==3283== by 0x80E8F68: main (comm.c:469)
==3283==
==3283== Open AF_INET socket 31: 66.221.0.71:4000 <-> 80.179.17.18:36943
==3283== at 0x4154A0C: accept (in /lib/libc-2.7.so)
==3283== by 0x80E9D58: init_descriptor (comm.c:1071)
==3283== by 0x80E9251: game_loop_unix (comm.c:798)
==3283== by 0x80E8F68: main (comm.c:469)
==3283==
==3283== Open AF_INET socket 21: 66.221.0.71:4000 <-> 80.179.17.18:36807
==3283== at 0x4154A0C: accept (in /lib/libc-2.7.so)
==3283== by 0x80E9D58: init_descriptor (comm.c:1071)
==3283== by 0x80E9251: game_loop_unix (comm.c:798)
==3283== by 0x80E8F68: main (comm.c:469)
==3283==
==3283== Open AF_INET socket 27: 66.221.0.71:4000 <-> 80.179.17.18:36668
==3283== at 0x4154A0C: accept (in /lib/libc-2.7.so)
==3283== by 0x80E9D58: init_descriptor (comm.c:1071)
==3283== by 0x80E9251: game_loop_unix (comm.c:798)
==3283== by 0x80E8F68: main (comm.c:469)
==3283==
==3283== Open AF_INET socket 26: 66.221.0.71:4000 <-> 80.179.17.18:36487
==3283== at 0x4154A0C: accept (in /lib/libc-2.7.so)
==3283== by 0x80E9D58: init_descriptor (comm.c:1071)
==3283== by 0x80E9251: game_loop_unix (comm.c:798)
==3283== by 0x80E8F68: main (comm.c:469)
==3283==
==3283== Open AF_INET socket 24: 66.221.0.71:4000 <-> 80.179.17.18:36367
==3283== at 0x4154A0C: accept (in /lib/libc-2.7.so)
==3283== by 0x80E9D58: init_descriptor (comm.c:1071)
==3283== by 0x80E9251: game_loop_unix (comm.c:798)
==3283== by 0x80E8F68: main (comm.c:469)
==3283==
==3283== Open AF_INET socket 18: 66.221.0.71:4000 <-> 80.179.17.18:36236
==3283== at 0x4154A0C: accept (in /lib/libc-2.7.so)
==3283== by 0x80E9D58: init_descriptor (comm.c:1071)
==3283== by 0x80E9251: game_loop_unix (comm.c:798)
==3283== by 0x80E8F68: main (comm.c:469)
==3283==
==3283== Open AF_INET socket 23: 66.221.0.71:4000 <-> 80.179.17.18:36061
==3283== at 0x4154A0C: accept (in /lib/libc-2.7.so)
==3283== by 0x80E9D58: init_descriptor (comm.c:1071)
==3283== by 0x80E9251: game_loop_unix (comm.c:798)
==3283== by 0x80E8F68: main (comm.c:469)
==3283==
==3283== Open AF_INET socket 20: 66.221.0.71:4000 <-> 86.35.243.176:36983
==3283== at 0x4154A0C: accept (in /lib/libc-2.7.so)
==3283== by 0x80E9D58: init_descriptor (comm.c:1071)
==3283== by 0x80E9251: game_loop_unix (comm.c:798)
==3283== by 0x80E8F68: main (comm.c:469)
==3283==
==3283== Open AF_INET socket 17: 66.221.0.71:4000 <-> 14.148.192.99:55641
==3283== at 0x4154A0C: accept (in /lib/libc-2.7.so)
==3283== by 0x80E9D58: init_descriptor (comm.c:1071)
==3283== by 0x80E9251: game_loop_unix (comm.c:798)
==3283== by 0x80E8F68: main (comm.c:469)
==3283==
==3283== Open AF_INET socket 19: 66.221.0.71:4000 <-> 179.220.240.163:39208
==3283== at 0x4154A0C: accept (in /lib/libc-2.7.so)
==3283== by 0x80E9D58: init_descriptor (comm.c:1071)
==3283== by 0x80E9251: game_loop_unix (comm.c:798)
==3283== by 0x80E8F68: main (comm.c:469)
==3283==
==3283== Open AF_INET socket 22: 66.221.0.71:4000 <-> 78.189.100.242:34470
==3283== at 0x4154A0C: accept (in /lib/libc-2.7.so)
==3283== by 0x80E9D58: init_descriptor (comm.c:1071)
==3283== by 0x80E9251: game_loop_unix (comm.c:798)
==3283== by 0x80E8F68: main (comm.c:469)
==3283==
==3283== Open AF_INET socket 25: 66.221.0.71:4000 <-> 78.189.100.242:34275
==3283== at 0x4154A0C: accept (in /lib/libc-2.7.so)
==3283== by 0x80E9D58: init_descriptor (comm.c:1071)
==3283== by 0x80E9251: game_loop_unix (comm.c:798)
==3283== by 0x80E8F68: main (comm.c:469)
==3283==
==3283== Open AF_INET socket 13: 66.221.0.71:4000 <-> 27.75.145.5:36917
==3283== at 0x4154A0C: accept (in /lib/libc-2.7.so)
==3283== by 0x80E9D58: init_descriptor (comm.c:1071)
==3283== by 0x80E9251: game_loop_unix (comm.c:798)
==3283== by 0x80E8F68: main (comm.c:469)
==3283==
==3283== Open AF_INET socket 12: 66.221.0.71:4000 <-> 179.220.240.163:35779
==3283== at 0x4154A0C: accept (in /lib/libc-2.7.so)
==3283== by 0x80E9D58: init_descriptor (comm.c:1071)
==3283== by 0x80E9251: game_loop_unix (comm.c:798)
==3283== by 0x80E8F68: main (comm.c:469)
==3283==
==3283== Open AF_INET socket 16: 66.221.0.71:4000 <-> 27.75.145.5:36601
==3283== at 0x4154A0C: accept (in /lib/libc-2.7.so)
==3283== by 0x80E9D58: init_descriptor (comm.c:1071)
==3283== by 0x80E9251: game_loop_unix (comm.c:798)
==3283== by 0x80E8F68: main (comm.c:469)
==3283==
==3283== Open AF_INET socket 15: 66.221.0.71:4000 <-> 27.75.145.5:36401
==3283== at 0x4154A0C: accept (in /lib/libc-2.7.so)
==3283== by 0x80E9D58: init_descriptor (comm.c:1071)
==3283== by 0x80E9251: game_loop_unix (comm.c:798)
==3283== by 0x80E8F68: main (comm.c:469)
==3283==
==3283== Open AF_INET socket 11: 66.221.0.71:4000 <-> 27.75.145.5:36291
==3283== at 0x4154A0C: accept (in /lib/libc-2.7.so)
==3283== by 0x80E9D58: init_descriptor (comm.c:1071)
==3283== by 0x80E9251: game_loop_unix (comm.c:798)
==3283== by 0x80E8F68: main (comm.c:469)
==3283==
==3283== Open AF_INET socket 10: 66.221.0.71:4000 <-> 27.75.145.5:36018
==3283== at 0x4154A0C: accept (in /lib/libc-2.7.so)
==3283== by 0x80E9D58: init_descriptor (comm.c:1071)
==3283== by 0x80E9251: game_loop_unix (comm.c:798)
==3283== by 0x80E8F68: main (comm.c:469)
==3283==
==3283== Open AF_INET socket 9: 66.221.0.71:4000 <-> 173.217.35.18:59644
==3283== at 0x4154A0C: accept (in /lib/libc-2.7.so)
==3283== by 0x80E9D58: init_descriptor (comm.c:1071)
==3283== by 0x80E9251: game_loop_unix (comm.c:798)
==3283== by 0x80E8F68: main (comm.c:469)
/*
* Run the game.
*/
#if defined(macintosh) || defined(MSDOS)
boot_db();
log_string( "Merc is ready to rock." );
game_loop_mac_msdos( );
#endif
pulsenum = 1;
#if defined(unix)
if (!fCopyOver)
control = init_socket( port );
boot_db();
sprintf( log_buf, "End of Time is now running on port %d.", port );
log_string( log_buf );
if (fCopyOver)
copyover_recover();
game_loop_unix( control ); // <—– comm.c:469
close (control);
#endif
/*
* That's all, folks.
*/
log_string( "Normal termination of game." );
exit( 0 );
return 0;
}
#if defined(unix)
void game_loop_unix( int control )
{
static struct timeval null_time;
struct timeval last_time;
signal( SIGPIPE, SIG_IGN );
gettimeofday( &last_time, NULL );
current_time = (time_t) last_time.tv_sec;
// init_signals();
/* Main loop */
while ( !merc_down )
{
fd_set in_set;
fd_set out_set;
fd_set exc_set;
DESCRIPTOR_DATA *d;
int maxdesc;
#if defined(MALLOC_DEBUG)
if ( malloc_verify( ) != 1 )
abort( );
#endif
/*
* Poll all active descriptors.
*/
FD_ZERO( &in_set );
FD_ZERO( &out_set );
FD_ZERO( &exc_set );
FD_SET( control, &in_set );
maxdesc = control;
for ( d = descriptor_list; d; d = d->next )
{
maxdesc = UMAX( maxdesc, d->descriptor );
FD_SET( d->descriptor, &in_set );
FD_SET( d->descriptor, &out_set );
FD_SET( d->descriptor, &exc_set );
}
if ( select( maxdesc+1, &in_set, &out_set, &exc_set, &null_time ) < 0 )
{
perror( "Game_loop: select: poll" );
exit( 1 );
}
/*
* New connection?
*/
if ( FD_ISSET( control, &in_set ) )
init_descriptor( control ); // <—– comm.c:798
/*
* Kick out the freaky folks.
*/
for ( d = descriptor_list; d != NULL; d = d_next )
{
d_next = d->next;
if ( FD_ISSET( d->descriptor, &exc_set ) )
{
FD_CLR( d->descriptor, &in_set );
FD_CLR( d->descriptor, &out_set );
if ( d->character )
save_char_obj( d->character );
d->outtop = 0;
close_socket( d );
}
}
/*
* Process input.
*/
for ( d = descriptor_list; d != NULL; d = d_next )
{
d_next = d->next;
d->fcommand = FALSE;
if ( FD_ISSET( d->descriptor, &in_set ) )
{
if ( d->character != NULL )
d->character->timer = 0;
if ( !read_from_descriptor( d ) )
{
FD_CLR( d->descriptor, &out_set );
if ( d->character != NULL)
save_char_obj( d->character );
d->outtop = 0;
close_socket( d );
continue;
}
}
#if defined(unix)
void init_descriptor( int control )
{
char buf[MAX_STRING_LENGTH];
DESCRIPTOR_DATA *dnew;
struct sockaddr_in sock;
struct hostent *from;
int desc;
// size was unsigned (cygwin fix)
int size;
size = sizeof(sock);
getsockname( control, (struct sockaddr *) &sock, &size );
if ( ( desc = accept( control, (struct sockaddr *) &sock, &size) ) < 0 ) // <—– comm.c:1071
{
perror( "New_descriptor: accept" );
return;
}
#if !defined(FNDELAY)
#define FNDELAY O_NDELAY
#endif
if ( fcntl( desc, F_SETFL, FNDELAY ) == -1 )
{
perror( "New_descriptor: fcntl: FNDELAY" );
return;
}
/*
* Cons a new descriptor.
*/
dnew = new_descriptor();
dnew->descriptor = desc;
dnew->connected = CON_ANSI;
dnew->showstr_head = NULL;
dnew->showstr_point = NULL;
dnew->outsize = 2000;
dnew->pEdit = NULL; /* OLC */
dnew->pString = NULL; /* OLC */
dnew->editor = 0; /* OLC */
dnew->outbuf = alloc_mem( dnew->outsize );
dnew->pProtocol = ProtocolCreate();
size = sizeof(sock);
if ( getpeername( desc, (struct sockaddr *) &sock, &size ) < 0 )
{
perror( "New_descriptor: getpeername" );
dnew->host = str_dup( "(unknown)" );
}
else
{
/*
* Would be nice to use inet_ntoa here but it takes a struct arg,
* which ain't very compatible between gcc and system libraries.
*/
int addr;
addr = ntohl( sock.sin_addr.s_addr );
sprintf( buf, "%d.%d.%d.%d",
( addr >> 24 ) & 0xFF, ( addr >> 16 ) & 0xFF,
( addr >> 8 ) & 0xFF, ( addr ) & 0xFF
);
sprintf( log_buf, "Sock.sinaddr: %s", buf );
//log_string( log_buf );
from = gethostbyaddr( (char *) &sock.sin_addr,
sizeof(sock.sin_addr), AF_INET );
dnew->host = str_dup( from ? from->h_name : buf );
}
bool read_from_descriptor( DESCRIPTOR_DATA *d )
{
int iStart;
static char read_buf[MAX_PROTOCOL_BUFFER];
read_buf[0] = '\0';
/* Hold horses if pending command already. */
if ( d->incomm[0] != '\0' )
return TRUE;
/* Check for overflow. */
//iStart = strlen(d->inbuf);
//if ( iStart >= sizeof(d->inbuf) - 10 )
iStart = 0;
if ( strlen(d->inbuf) >= sizeof(d->inbuf) - 10 )
{
sprintf( log_buf, "%s input overflow!", d->host );
log_string( log_buf );
write_to_descriptor( d->descriptor,
"\r\n*** PUT A LID ON IT!!! ***\r\n", 0 );
return FALSE;
}
/* Snarf input. */
#if defined(macintosh)
for ( ; ; )
{
int c;
c = getc( stdin );
if ( c == '\0' || c == EOF )
break;
putc( c, stdout );
if ( c == '\r' )
putc( '\n', stdout );
//d->inbuf[iStart++] = c;
read_buf[iStart++] = c;
if ( iStart > sizeof(d->inbuf) - 10 )
break;
}
#endif
#if defined(MSDOS) || defined(unix)
for ( ; ; )
{
int nRead;
/*nRead = read( d->descriptor, d->inbuf + iStart,
sizeof(d->inbuf) - 10 - iStart );
if ( nRead > 0 )
{
iStart += nRead;
if ( d->inbuf[iStart-1] == '\n' || d->inbuf[iStart-1] == '\r' )
break;
}*/
nRead = read( d->descriptor, read_buf + iStart,
sizeof(read_buf) - 10 - iStart );
if ( nRead > 0 )
{
iStart += nRead;
if ( read_buf[iStart-1] == '\n' || read_buf[iStart-1] == '\r' )
break;
}
else if ( nRead == 0 )
{
//log_string( "EOF encountered on read." );
return FALSE;
}
else if ( errno == EWOULDBLOCK )
break;
else
{
perror( "Read_from_descriptor" );
return FALSE;
}
}
#endif
//d->inbuf[iStart] = '\0';
read_buf[iStart] = '\0';
ProtocolInput( d, read_buf, iStart, d->inbuf );
return TRUE;
}
/*
* New connection?
*/
if (FD_ISSET(s, &input_set))
if (new_descriptor(s) < 0)
log_info("New connection");
/*
* kick out the freaky folks
*/
for (point = descriptor_list; point; point = next_point) {
next_point = point->next;
if (FD_ISSET(point->descriptor, &exc_set)) {
FD_CLR(point->descriptor, &input_set);
FD_CLR(point->descriptor, &output_set);
close_socket(point);
}
}
for (point = descriptor_list; point; point = next_point) {
next_point = point->next;
if (FD_ISSET(point->descriptor, &input_set))
if (process_input(point) < 0)
close_socket(point);
}
/*
* process_commands;
*/
for (point = descriptor_list; point; point = next_to_process) {
next_to_process = point->next;