Update of /cvsroot/netrek/client/netrekxp/src
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv9311/src

Modified Files:
	data.c defaults.c parsemeta.c 
Log Message:
- added "metaVerbose: on/(off)" and "metaUDPCache: (filename)" options to netrekrc
  and help docs, these were part of the UDP metaserver merge

Index: parsemeta.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/parsemeta.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- parsemeta.c	29 Nov 2006 12:06:35 -0000	1.15
+++ parsemeta.c	29 Nov 2006 15:01:33 -0000	1.16
@@ -68,7 +68,6 @@
 static int msock = -1;		/* the socket to talk to the metaservers	*/
 static int sent = 0;		/* number of solicitations sent			*/
 static int seen = 0;		/* number of replies seen			*/
-static int verbose = 0;		/* whether to talk a lot about it all		*/
 static int type;		/* type of connection requested			*/
 #define RTT_AVG_BUFLEN  5	/* number of samples used for average rtt time	*/
 
@@ -357,7 +356,7 @@
   metaPort = intDefault("metaPort", metaPort);
 
   /* whether to report everything that happens */
-  verbose = booleanDefault("metaVerbose", verbose);
+  metaVerbose = booleanDefault("metaVerbose", metaVerbose);
 
   /* create the socket */
   if (msock < 0) {
@@ -379,7 +378,7 @@
   address.sin_family = AF_INET;
   address.sin_port = htons(metaPort);
   address.sin_addr.s_addr = inet_addr("224.0.0.1");
-  if (verbose)
+  if (metaVerbose)
     LineToConsole ("Requesting player list from nearby servers on %s\n",
                     inet_ntoa(address.sin_addr));
   if (sendto(msock, "?", 1, 0, (struct sockaddr *)&address,
@@ -418,7 +417,7 @@
 	  /* check for end of list of addresses */
 	  if (hp->h_addr_list[i] == NULL) break;
 	  address.sin_addr.s_addr = *(long *) hp->h_addr_list[i];
-	  if (verbose)
+	  if (metaVerbose)
             LineToConsole ("Requesting player list from metaserver %s at %s\n",
                             token, inet_ntoa(address.sin_addr));
 	  if (sendto(msock, "?", 1, 0, (struct sockaddr *)&address,
@@ -431,7 +430,7 @@
       }
     } else {
       /* call to inet_addr() worked, host name is in IP address form */
-      if (verbose)
+      if (metaVerbose)
         LineToConsole ("Requesting player list from metaserver %s\n",
                         inet_ntoa(address.sin_addr));
       if (sendto(msock, "?", 1, 0, (struct sockaddr *)&address,
@@ -489,7 +488,7 @@
   if (servers > 2048) return;
   if (servers < 0) return;
 
-  if (verbose) 
+  if (metaVerbose) 
     LineToConsole ("Metaserver at %s responded with %d server%s\n",
 		   inet_ntoa(address->sin_addr),
 		   servers,
@@ -630,7 +629,7 @@
   is the case with multihomed machines */
   host = inet_ntoa(address->sin_addr);
 
-  if (verbose) 
+  if (metaVerbose) 
     LineToConsole ("Server at %s responded\n", host);
 
   p = strtok(NULL,",");	/* server type */

Index: defaults.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/defaults.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- defaults.c	29 Nov 2006 13:06:41 -0000	1.32
+++ defaults.c	29 Nov 2006 15:01:33 -0000	1.33
@@ -281,6 +281,12 @@
         }
     },
 #endif
+    {"metaVerbose", &metaVerbose, RC_BOOL,
+        {
+            "Show detailed messages during connect to metaserver",
+            NULL
+        }
+    },
 #endif
 
 #ifdef MOTION_MOUSE
@@ -2078,6 +2084,16 @@
     	if (saveBig)
     	    fputs ("\n", fp);
     }
+    // UDP metacache
+    if (metaUDPCache != NULL)
+    {
+    	if (saveBig)
+    	    fputs ("# UDP Metacache file\n", fp);
+    	sprintf (str, "metaUDPCache: %s\n", metaUDPCache);
+    	fputs (str, fp);
+    	if (saveBig)
+    	    fputs ("\n", fp);
+    }
 
     // player list
     if (strlen (plistLayout) != 0)

Index: data.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/data.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- data.c	29 Nov 2006 13:06:41 -0000	1.43
+++ data.c	29 Nov 2006 15:01:33 -0000	1.44
@@ -231,7 +231,9 @@
 /* Metaservers list - comma delimited  */
 char *metaServer = "metaserver.us.netrek.org, metaserver2.us.netrek.org";
 int metaPort = 3521;
+int metaVerbose = 0;
 char *metaCache = NULL;
+char *metaUDPCache = NULL;
 #ifdef METAPING
 int metaPing = 1;				/*  ICMP ping the metaserverlist */
 #endif