Update of /cvsroot/netrek/client/cow In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28506 Modified Files: ChangeLog parsemeta.c Log Message: fix ReadMetasRecv regression Index: parsemeta.c =================================================================== RCS file: /cvsroot/netrek/client/cow/parsemeta.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- parsemeta.c 27 Jan 2006 09:57:27 -0000 1.8 +++ parsemeta.c 22 Feb 2006 22:55:22 -0000 1.9 @@ -1,6 +1,9 @@ /* meta.c * * $Log$ + * Revision 1.9 2006/02/22 22:55:22 quozl + * fix ReadMetasRecv regression + * * Revision 1.8 2006/01/27 09:57:27 quozl * *** empty log message *** * @@ -299,17 +302,19 @@ verbose = booleanDefault("metaverbose", verbose); /* create the socket */ - if (msock < 0) msock = socket(AF_INET, SOCK_DGRAM, 0); - if (msock < 0) { perror("ReadMetasSend: socket"); return 0; } - - /* bind the socket to any address */ - address.sin_addr.s_addr = INADDR_ANY; - address.sin_family = AF_INET; - address.sin_port = 0; - if (bind(msock,(struct sockaddr *)&address, sizeof(address)) < 0) { - perror("ReadMetasSend: bind"); - close(msock); - return 0; + if (msock < 0) { + msock = socket(AF_INET, SOCK_DGRAM, 0); + if (msock < 0) { perror("ReadMetasSend: socket"); return 0; } + + /* bind the socket to any address */ + address.sin_addr.s_addr = INADDR_ANY; + address.sin_family = AF_INET; + address.sin_port = 0; + if (bind(msock,(struct sockaddr *)&address, sizeof(address)) < 0) { + perror("ReadMetasSend: bind"); + close(msock); + return 0; + } } /* send request to a multicast metaserver on local area network */ Index: ChangeLog =================================================================== RCS file: /cvsroot/netrek/client/cow/ChangeLog,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- ChangeLog 1 Feb 2006 14:51:42 -0000 1.21 +++ ChangeLog 22 Feb 2006 22:55:22 -0000 1.22 @@ -1,3 +1,9 @@ +Thu Feb 23 09:40:58 2006 James Cameron <quozl at us.netrek.org> + + * parsemeta.c (ReadMetasSend): fix regression caused by previous + change, resulting in bad file descriptor errors from select in + ReadMetasRecv(). + 2006-02-01 Bob Tanner <tanner at real-time.com> * debian/changelog, debian/find-key.sh, debian/rules: