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

Modified Files:
	option.c parsemeta.c 
Log Message:
Adopt COW patches for updates/sec and metaserver.
Resolves metawin display bug with unresolvable host name.

Index: parsemeta.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/parsemeta.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- parsemeta.c	7 May 2009 23:57:35 -0000	1.48
+++ parsemeta.c	21 May 2009 00:15:03 -0000	1.49
@@ -1796,10 +1796,10 @@
     {
     	if (type == 1)
 	{
-	    do
-            {
-	        if (ReadMetasRecv(W_Socket())) metawindow();
-	    } while (!W_EventsPending());
+            while (1) {
+                if (W_EventsPending()) break;
+                if (ReadMetasRecv(W_Socket())) metawindow();
+            }
 	}
 	/* wait for any event */
 	W_NextEvent (&data);

Index: option.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/option.c,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -d -r1.56 -r1.57
--- option.c	16 Jul 2008 00:16:11 -0000	1.56
+++ option.c	21 May 2009 00:15:03 -0000	1.57
@@ -856,10 +856,10 @@
     /* Is it a special non-linear option range? i.e updatesPerSec */
     else if (op->op_range && op->op_option == &updatesPerSec)
     {
-    	if (data->key == W_RBUTTON)
-    	{
-    	    if (++updatesPerSec > server_fps) ; /* Don't exceed server fps */
-    	    else 
+        if (data->key == W_RBUTTON)
+        {
+            if (++updatesPerSec > server_fps) ; /* Don't exceed server fps */
+            else 
                 while (server_fps % updatesPerSec != 0) updatesPerSec++;
         }
         else if (data->key == W_MBUTTON)
@@ -875,6 +875,11 @@
             updatesPerSec = 1;
         if (updatesPerSec < 1)
             updatesPerSec = server_fps;
+        if (updatesPerSec != lastUpdateSpeed)
+        {
+            sendUpdatePacket (1000000 / updatesPerSec);
+            lastUpdateSpeed = updatesPerSec;
+        }
     }
 
     /* Does the button have a range of values? */
@@ -1056,11 +1061,6 @@
         STRNCPY (login, newlogin, PSEUDOSIZE);
         *newlogin = '\0';
     }
-    if (updatesPerSec != lastUpdateSpeed)
-    {
-        sendUpdatePacket (1000000 / updatesPerSec);
-        lastUpdateSpeed = updatesPerSec;
-    }
 
     sendOptionsPacket ();       /* update server as to the
                                  * client's options */