From: Carl Worth Date: Fri, 9 Dec 2005 17:25:11 +0000 (+0000) Subject: 2005-12-09 Carl Worth X-Git-Url: https://git.cworth.org/git?p=ttt;a=commitdiff_plain;h=da40516db47b4c719aaad66a05302f13d1b6358e 2005-12-09 Carl Worth * src/ttt-server.c (ttt_server_unregister_client): Move client has left message to stderr so it makes it to the log file too. --- diff --git a/ChangeLog b/ChangeLog index d714dd6..dd3bc91 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-12-09 Carl Worth + + * 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 * src/ttt-server.c (main): Put the initial server started message diff --git a/TODO b/TODO index 09463f7..b6257c2 100644 --- 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. +Protocol pieces +--------------- + /----- 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 +Other bits +---------- +Server log messages should include pid date and time. And server +should log the fact when it gets terminated by a signal. diff --git a/src/ttt-server.c b/src/ttt-server.c index 7a3ed34..cb28741 100644 --- a/src/ttt-server.c +++ b/src/ttt-server.c @@ -110,7 +110,7 @@ ttt_server_unregister_client (ttt_server_t *server, ttt_client_t *client) 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 *));