version 1.39 | | version 1.40 |
---|
| | |
/* | | /* |
* static char *rcsid_init_c = | | * static char *rcsid_init_c = |
* "$Id: init.c,v 1.39 2005/09/04 16:58:13 akirschbaum Exp $"; | | * "$Id: init.c,v 1.40 2005/10/24 22:51:03 akirschbaum Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
#ifdef HAVE_ARPA_INET_H | | #ifdef HAVE_ARPA_INET_H |
#include <arpa/inet.h> | | #include <arpa/inet.h> |
#endif | | #endif |
| | #include <loader.h> |
#include <newserver.h> | | #include <newserver.h> |
| | |
Socket_Info socket_info; | | Socket_Info socket_info; |
| | |
*/ | | */ |
memset( ns->inbuf.buf, 0, sizeof( unsigned char ) * MAXSOCKBUF ); | | memset( ns->inbuf.buf, 0, sizeof( unsigned char ) * MAXSOCKBUF ); |
memset(&ns->lastmap,0,sizeof(struct Map)); | | memset(&ns->lastmap,0,sizeof(struct Map)); |
memset(&ns->faces_sent,0,sizeof(ns->faces_sent)); | | memset(ns->faces_sent, 0, nrofpixmaps*sizeof(*ns->faces_sent)); |
memset(&ns->anims_sent,0,sizeof(ns->anims_sent)); | | memset(&ns->anims_sent,0,sizeof(ns->anims_sent)); |
memset(&ns->stats,0,sizeof(struct statsinfo)); | | memset(&ns->stats,0,sizeof(struct statsinfo)); |
/* Do this so we don't send a face command for the client for | | /* Do this so we don't send a face command for the client for |
| | |
LOG(llevDebug,"Initialize new client/server data\n"); | | LOG(llevDebug,"Initialize new client/server data\n"); |
socket_info.nconns = 1; | | socket_info.nconns = 1; |
init_sockets = malloc(sizeof(NewSocket)); | | init_sockets = malloc(sizeof(NewSocket)); |
| | init_sockets[0].faces_sent = NULL; /* unused */ |
socket_info.allocated_sockets=1; | | socket_info.allocated_sockets=1; |
| | |
protox = getprotobyname("tcp"); | | protox = getprotobyname("tcp"); |