[Tux4kids-commits] r1278 - tuxmath/branches/lan/src

akash gangil gangil-guest at alioth.debian.org
Sun Jul 26 19:51:09 UTC 2009


Author: gangil-guest
Date: 2009-07-26 19:51:07 +0000 (Sun, 26 Jul 2009)
New Revision: 1278

Modified:
   tuxmath/branches/lan/src/network.c
Log:
tuxmath server can be named

Modified: tuxmath/branches/lan/src/network.c
===================================================================
--- tuxmath/branches/lan/src/network.c	2009-07-26 19:47:47 UTC (rev 1277)
+++ tuxmath/branches/lan/src/network.c	2009-07-26 19:51:07 UTC (rev 1278)
@@ -481,7 +481,7 @@
   {
     servers[i].ip.host = pkt->address.host;
     servers[i].ip.port = pkt->address.port;
-    strncpy(servers[i].name, "TuxMath LAN Server" , NAME_SIZE);
+    sscanf(pkt->data,"%*s %s\n",servers[i].name);
     i++;
   }
 
@@ -494,7 +494,7 @@
   printf("Detected servers:\n");
   while(i < MAX_SERVERS && servers[i].ip.host != 0)
   {
-    printf("Host %d: %s\n", i, servers[i].name);
+    printf("Host %d:Tuxmath Server's NAME-------- %s\n", i,servers[i].name);
     i++;
   }
 }




More information about the Tux4kids-commits mailing list