[Tux4kids-commits] r1166 - tuxmath/branches/lan/server
akash gangil
gangil-guest at alioth.debian.org
Thu Jul 9 12:06:50 UTC 2009
Author: gangil-guest
Date: 2009-07-09 12:06:49 +0000 (Thu, 09 Jul 2009)
New Revision: 1166
Modified:
tuxmath/branches/lan/server/testclient.c
Log:
Minor fix
Modified: tuxmath/branches/lan/server/testclient.c
===================================================================
--- tuxmath/branches/lan/server/testclient.c 2009-07-09 10:33:28 UTC (rev 1165)
+++ tuxmath/branches/lan/server/testclient.c 2009-07-09 12:06:49 UTC (rev 1166)
@@ -214,6 +214,18 @@
fprintf(stderr, "SDLNet_TCP_Send: %s\n", SDLNet_GetError());
exit(EXIT_FAILURE);
}
+
+ snprintf(buffer, NET_BUF_LEN,
+ "%s\n",
+ "NEXT_QUESTION");
+ len = strlen(buffer) + 1;
+ 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);
+ }
+
+
return 1;
}
@@ -368,8 +380,8 @@
command[i] = '\0';
#ifdef LAN_DEBUG
- printf("buf is %s\n", buf);
- printf("command is %s\n", command);
+// printf("buf is %s\n", buf);
+// printf("command is %s\n", command);
#endif
/* Now we process the buffer according to the command: */
if(strncmp(command, "SEND_QUESTION", 13) == 0)
More information about the Tux4kids-commits
mailing list