]> git.mxchange.org Git - flightgear.git/commitdiff
Patch from Oliver.
authorcurt <curt>
Thu, 15 Jun 2000 22:31:57 +0000 (22:31 +0000)
committercurt <curt>
Thu, 15 Jun 2000 22:31:57 +0000 (22:31 +0000)
src/NetworkOLK/Tools/fgd.c

index 66a744fd7b23d473a6dd36dfe24ae53ca63f062f..07a5931a2d9cc6eb26993605675cce56b24538aa 100644 (file)
@@ -2,7 +2,7 @@
 /* FGD.C by Oliver Delise                                    */
 /* Contact info:                                             */
 /* e-mail: delise@mail.isis.de                               */
-/* www: http://www.isis.de/members/odelise/progs/flightgear  */
+/* www: http://www.isis.de/members/~odelise/progs/flightgear  */
 /*                                                           */
 /* Version 0.1-beta                                          */
 /* The author of this program offers no waranty at all       */
@@ -29,6 +29,7 @@
 /*             v0.1-alpha   : Nov 08 1999                    */
 /*             v0.1-beta    : Jan 16 2000                    */
 /*                            libc5, glibc-2.0, 2.1 cleanups */
+/*                            June 8 2000    socket cleanup  */
 /*************************************************************/
 
 
@@ -218,6 +219,8 @@ int fgd_ele_len;
 struct sockaddr_in address;
 struct sockaddr_in my_address;
 int result;
+socklen_t size = sizeof(address);
+
 
 extern int errno;
 int current_port = 0; 
@@ -317,7 +320,7 @@ for (;;){
     tv.tv_usec = 0;
     nready = select( sock + 1, &rset, NULL, NULL, &tv);
     if (FD_ISSET( sock, &rset)) {
-      my_sock = accept( sock, (struct sockaddr *)&address, (int*) sizeof(address));
+      my_sock = accept( sock, (struct sockaddr *)&address, &size);
       anz = 2;
 /* reading length of senders' ip */
       fgd_ele_len =  0;