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

Modified Files:
	cowmain.c defaults.c parsemeta.c 
Log Message:
Minor fixes to error request messgaes in certain metaserver/metaping cases.
Moved initial read of updatesPerSec to occur after receipt of feature packets.
Server is now sending both FPS and UPS on client connect, but we want client
to send a request for updatesPerSec using the value in the netrekrc, so we need
to read it in after those initial feature packets are received.

Index: cowmain.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/cowmain.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- cowmain.c	1 Mar 2007 07:35:44 -0000	1.27
+++ cowmain.c	3 Mar 2007 10:02:44 -0000	1.28
@@ -1055,6 +1055,7 @@
         sendUdpReq (COMM_UPDATE);
 #endif
         /* Send request for updatesPerSec.  New servers now support 50 u/s */
+        lastUpdateSpeed = updatesPerSec = intDefault ("updatesPerSec", updatesPerSec);
         sendUpdatePacket (1000000 / updatesPerSec);
 
 #ifdef HOCKEY_LINES

Index: parsemeta.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/parsemeta.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- parsemeta.c	2 Mar 2007 12:57:54 -0000	1.32
+++ parsemeta.c	3 Mar 2007 10:02:44 -0000	1.33
@@ -746,7 +746,8 @@
     if (bytes < 0) {
       /* Don't return on the initial call, allow time for other metaservers */
       if (x != -1) {
-        perror("ReadMetasRecv: recvfrom");
+        if (errno)
+          perror("ReadMetasRecv: recvfrom");
         return 0;
       }
     }
@@ -1924,7 +1925,7 @@
 	if (nRet == SOCKET_ERROR)
 	{
 	    metaPing_ReportError("sendto()");
-	    LineToConsole("IP address %s\n", lpstToAddr->sin_addr.s_addr);
+	    LineToConsole("Error pinging %s\n", inet_ntoa(lpstToAddr->sin_addr));
 	}
 	return (nRet);
 }
@@ -1952,7 +1953,7 @@
 	if (nRet == SOCKET_ERROR) 
 	{
 		metaPing_ReportError("recvfrom()");
-		LineToConsole("IP address %s\n", lpsaFrom->sin_addr.s_addr);
+		LineToConsole("Error receiving ping from %s\n", inet_ntoa(lpsaFrom->sin_addr));
 		return SOCKET_ERROR;
 	}
 

Index: defaults.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/defaults.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -d -r1.51 -r1.52
--- defaults.c	2 Mar 2007 12:57:52 -0000	1.51
+++ defaults.c	3 Mar 2007 10:02:44 -0000	1.52
@@ -1586,7 +1586,6 @@
     detCircle = booleanDefault ("detCircle", detCircle);
     puckCircle = booleanDefault ("puckCircle", puckCircle);
     showArmy = booleanDefault ("showArmy", showArmy);
-    lastUpdateSpeed = updatesPerSec = intDefault ("updatesPerSec", updatesPerSec);
     redrawDelay = intDefault ("redrawDelay", redrawDelay);
     planetHighlighting = booleanDefault ("planetHighlighting", planetHighlighting);
     rotatePlanets = booleanDefault ("rotatePlanets", rotatePlanets);