diff options
Diffstat (limited to 'src/ClientList.cxx')
-rw-r--r-- | src/ClientList.cxx | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/src/ClientList.cxx b/src/ClientList.cxx index b45be34c3..bfa04fea1 100644 --- a/src/ClientList.cxx +++ b/src/ClientList.cxx @@ -30,25 +30,11 @@ static std::list<Client *> clients; static unsigned num_clients; bool -client_list_is_empty(void) -{ - return num_clients == 0; -} - -bool client_list_is_full(void) { return num_clients >= client_max_connections; } -Client * -client_list_get_first(void) -{ - assert(!clients.empty()); - - return clients.front(); -} - void client_list_add(Client *client) { @@ -74,3 +60,12 @@ client_list_remove(Client *client) clients.erase(i); --num_clients; } + +void +client_list_close_all() +{ + while (!clients.empty()) + clients.front()->Close(); + + assert(num_clients == 0); +} |