[tuxdroid-svn] r437 - daemon/trunk/libs
Status: Beta
Brought to you by:
ks156
From: neimad <c2m...@c2...> - 2007-06-24 13:01:25
|
Author: neimad Date: 2007-06-24 15:01:23 +0200 (Sun, 24 Jun 2007) New Revision: 437 Modified: daemon/trunk/libs/USBDaemon_tcp_server.c Log: * Moved tcp_remove_client() below tcp_add_client(). One is static, one is not, which means there's something not quite right. Need cleaning this up. Modified: daemon/trunk/libs/USBDaemon_tcp_server.c =================================================================== --- daemon/trunk/libs/USBDaemon_tcp_server.c 2007-06-24 12:59:50 UTC (rev 436) +++ daemon/trunk/libs/USBDaemon_tcp_server.c 2007-06-24 13:01:23 UTC (rev 437) @@ -140,6 +140,22 @@ } /** + * Remove a TCP client. + * + * The client's entry in the clients array is left empty (-1), so this + * array may contain holes. + * + * @param[in] id_client Id of client to remove + */ +void tcp_remove_client(int id_client) +{ + close(tcp_clients_handle[id_client]); + tcp_clients_handle[id_client] = -1; + + tcp_clients_count--; +} + +/** * Server's event loop */ void tcp_server_loop(void) @@ -284,19 +300,3 @@ close(tcp_server_handle); } - -/** - * Remove a TCP client. - * - * The client's entry in the clients array is left empty (-1), so this - * array may contain holes. - * - * @param[in] id_client Id of client to remove - */ -void tcp_remove_client(int id_client) -{ - close(tcp_clients_handle[id_client]); - tcp_clients_handle[id_client] = -1; - - tcp_clients_count--; -} |