Update of /cvsroot/netrek/client/netrekxp/src
In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29313

Modified Files:
	parsemeta.c 
Log Message:
Use static variables for req and reqlen, only call once

Index: parsemeta.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/parsemeta.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- parsemeta.c	7 May 2009 22:24:03 -0000	1.47
+++ parsemeta.c	7 May 2009 23:57:35 -0000	1.48
@@ -355,8 +355,8 @@
   char *metaservers;		/* our copy of the metaserver host names */
   char *token;			/* current metaserver host name          */
   struct sockaddr_in address;	/* the address of the metaservers	 */
-  char req[80];			/* the request packet for the metaserver */
-  int reqlen;			/* the length of the request packet      */
+  static char *req;		/* the request packet for the metaserver */
+  static int reqlen;		/* the length of the request packet      */
 
   /* create the socket */
   if (msock < 0) {
@@ -372,9 +372,10 @@
       closesocket(msock);
       return 0;
     }
+    req = (char *) malloc(80);
+    sprintf(req, "?version=%s %s", version, mvers);
+    reqlen = strlen(req);
   }
-  sprintf(req, "?version=%s %s", version, mvers);
-  reqlen = strlen(req);
 
   /* send request to a multicast metaserver on local area network */
   address.sin_family = AF_INET;