]> git.cworth.org Git - ttt/commitdiff
2005-12-09 Carl Worth <cworth@cworth.org>
authorCarl Worth <carl@theworths.org>
Fri, 9 Dec 2005 17:25:11 +0000 (17:25 +0000)
committerCarl Worth <carl@theworths.org>
Fri, 9 Dec 2005 17:25:11 +0000 (17:25 +0000)
        * src/ttt-server.c (ttt_server_unregister_client): Move client has
        left message to stderr so it makes it to the log file too.

ChangeLog
TODO
src/ttt-server.c

index d714dd6181a9a14f11af77e4aaf988b2d5f57344..dd3bc913c544843499a3d786483f1b86eb3b306d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-12-09  Carl Worth  <cworth@cworth.org>
+
+       * src/ttt-server.c (ttt_server_unregister_client): Move client has
+       left message to stderr so it makes it to the log file too.
+
 2005-12-09  Carl Worth  <cworth@cworth.org>
 
        * src/ttt-server.c (main): Put the initial server started message
 2005-12-09  Carl Worth  <cworth@cworth.org>
 
        * src/ttt-server.c (main): Put the initial server started message
diff --git a/TODO b/TODO
index 09463f7c8321060a0d82e3fe1434c6d1e6c5f754..b6257c2be7d315f39b7c667222da2002fe3e0895 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,6 +1,9 @@
 Use the first letter of your name to indicate you are in the middle of
 working on something.
 
 Use the first letter of your name to indicate you are in the middle of
 working on something.
 
+Protocol pieces
+---------------
+
   /----- Server, implemented in ttt-server
  / /---- Client, implemented in ttt
 S C
   /----- Server, implemented in ttt-server
  / /---- Client, implemented in ttt
 S C
@@ -61,3 +64,7 @@ S C
     3.6.2.1. ERROR NOT_YOUR_TURN
     3.6.2.2. ERROR NOT_VALID_MOVE
 
     3.6.2.1. ERROR NOT_YOUR_TURN
     3.6.2.2. ERROR NOT_VALID_MOVE
 
+Other bits
+----------
+Server log messages should include pid date and time. And server
+should log the fact when it gets terminated by a signal.
index 7a3ed341236658a9f34a7cd0651cff0cf03936ce..cb28741885721763fd54abd4a8a83b270e07f442 100644 (file)
@@ -110,7 +110,7 @@ ttt_server_unregister_client (ttt_server_t *server, ttt_client_t *client)
 
     assert (i < server->num_clients);
 
 
     assert (i < server->num_clients);
 
-    printf ("Client %s has left.\r\n", ttt_client_get_username (client));
+    fprintf (stderr, "Client %s has left.\r\n", ttt_client_get_username (client));
 
     memmove (&server->clients[i], &server->clients[i+1],
             (server->num_clients - i - 1) * sizeof (ttt_client_t *));
 
     memmove (&server->clients[i], &server->clients[i+1],
             (server->num_clients - i - 1) * sizeof (ttt_client_t *));