[Tux4kids-commits] r1070 - tuxmath/branches/lan/server
akash gangil
gangil-guest at alioth.debian.org
Thu Jun 18 22:39:57 UTC 2009
Author: gangil-guest
Date: 2009-06-18 22:39:57 +0000 (Thu, 18 Jun 2009)
New Revision: 1070
Modified:
tuxmath/branches/lan/server/server.c
Log:
Please dont remove id from SendMessage switch call with ANSWER_CORRECT it tells the client the question that was answered correctly , is is the identifier!!
Modified: tuxmath/branches/lan/server/server.c
===================================================================
--- tuxmath/branches/lan/server/server.c 2009-06-18 20:00:47 UTC (rev 1069)
+++ tuxmath/branches/lan/server/server.c 2009-06-18 22:39:57 UTC (rev 1070)
@@ -163,7 +163,7 @@
case CORRECT_ANSWER:
{
- if(!SendMessage(ANSWER_CORRECT, 0))
+ if(!SendMessage(ANSWER_CORRECT,id))
{
printf("Unable to communicate to the client\n");
}
@@ -213,7 +213,7 @@
}
/* Close the client socket */
- SDLNet_TCP_Close(csd);
+ SDLNet_TCP_Close(csd); // int SDLNet TCP DelSocket(SDLNet_SocketSet set, TCPsocket sock )
}
}
/* Clean up mathcards heap memory */
@@ -282,10 +282,10 @@
snprintf(buf, NET_BUF_LEN, "%s\t%s\n", "SEND_MESSAGE", msg);
x = SDLNet_TCP_Send(csd, buf, NET_BUF_LEN);
-#ifdef LAN_DEBUG
+//#ifdef LAN_DEBUG
printf("buf is: %s\n", buf);
printf("SendMessage() - buf sent:::: %d bytes\n", x);
-#endif
+//#endif
return 1;
}
More information about the Tux4kids-commits
mailing list