[Tux4kids-commits] r1112 - tuxmath/branches/lan/server

akash gangil gangil-guest at alioth.debian.org
Mon Jun 29 19:10:55 UTC 2009


Author: gangil-guest
Date: 2009-06-29 19:10:54 +0000 (Mon, 29 Jun 2009)
New Revision: 1112

Modified:
   tuxmath/branches/lan/server/testclient.c
Log:
Minor Fix

Modified: tuxmath/branches/lan/server/testclient.c
===================================================================
--- tuxmath/branches/lan/server/testclient.c	2009-06-29 18:57:02 UTC (rev 1111)
+++ tuxmath/branches/lan/server/testclient.c	2009-06-29 19:10:54 UTC (rev 1112)
@@ -94,26 +94,22 @@
     // perhaps you need to restart the set and make it bigger...
   }
 
+  if (SDLNet_TCP_Send(sd, (void *)buffer, NET_BUF_LEN) < NET_BUF_LEN)
+  {
+   fprintf(stderr, "SDLNet_TCP_Send: %s\n", SDLNet_GetError());
+   exit(EXIT_FAILURE);
+  }
+#ifdef LAN_DEBUG
+  printf("Sent the name of the player %s\n",check1);
+#endif
 
 
   /* Send messages */
   quit = 0;
-  while (!quit)
+  do
   { 
     //Get user input from command line and send it to server: 
-
-
-      if (SDLNet_TCP_Send(sd, (void *)buffer, NET_BUF_LEN) < NET_BUF_LEN)
-      {
-       fprintf(stderr, "SDLNet_TCP_Send: %s\n", SDLNet_GetError());
-       exit(EXIT_FAILURE);
-      }
-#ifdef LAN_DEBUG
-  printf("Sent the name of the player %s\n",check1);
-#endif
-
-
-   /*now display the options*/
+  /*now display the options*/
     printf("Welcome to the Tux Math Test Client!\n");
     printf("Type:\n"
              "'game' to start math game;\n"
@@ -146,7 +142,7 @@
              "'exit' to end client leaving server running;\n"
              "'quit' to end both client and server\n\n>\n");
     }
-  }
+  }while(!quit);
  
   SDLNet_TCP_Close(sd);
   SDLNet_FreeSocketSet(set);




More information about the Tux4kids-commits mailing list