extend deletion functions in LL.c, use them to make "bye" client command work

This commit is contained in:
marschap
2008-11-30 15:30:28 +00:00
parent a197581bd3
commit dcc643ec18
13 changed files with 79 additions and 51 deletions
+3 -3
View File
@@ -10,7 +10,7 @@
* Copyright (c) 1999, William Ferrell, Scott Scriven
* 2003, Benjamin Tse (blt@ieee.org) - Winsock port
* 2004, F5 Networks, Inc. - IP-address input
* 2005-2008, Peter Marschall - error checks, ...
* 2005, Peter Marschall - error checks, ...
*
*/
@@ -478,7 +478,7 @@ sock_destroy_socket(void)
report(RPT_NOTICE, "Client on socket %i disconnected",
entry->socket);
client_destroy(entry->client);
clients_remove_client(entry->client);
clients_remove_client(entry->client, PREV);
entry->client = NULL;
}
else {
@@ -490,7 +490,7 @@ sock_destroy_socket(void)
close(entry->socket);
/* re-add socket to the free socket pool */
entry = (ClientSocketMap *) LL_DeleteNode(openSocketList);
entry = (ClientSocketMap *) LL_DeleteNode(openSocketList, PREV);
LL_Push(freeClientSocketList, (void*) entry);
}
}