aboutsummaryrefslogtreecommitdiff
path: root/src/ClientNew.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-01-16 22:55:33 +0100
committerMax Kellermann <max@duempel.org>2013-01-16 23:00:13 +0100
commit601495fa0f3d3793d4ee761d1b86f8435417266c (patch)
tree1284f0f0ac48668391063e5f45eba08d0b59c2ed /src/ClientNew.cxx
parent1998633739b027b97ff89f92825512db91dca8f9 (diff)
ClientList: convert to a class
Diffstat (limited to 'src/ClientNew.cxx')
-rw-r--r--src/ClientNew.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ClientNew.cxx b/src/ClientNew.cxx
index 2a4774c5..74cb0cc8 100644
--- a/src/ClientNew.cxx
+++ b/src/ClientNew.cxx
@@ -21,6 +21,7 @@
#include "ClientInternal.hxx"
#include "ClientList.hxx"
#include "Partition.hxx"
+#include "Main.hxx"
#include "fd_util.h"
extern "C" {
#include "resolver.h"
@@ -95,7 +96,7 @@ client_new(EventLoop &loop, Partition &partition,
}
#endif /* HAVE_WRAP */
- if (client_list_is_full()) {
+ if (client_list->IsFull()) {
g_warning("Max Connections Reached!");
close_socket(fd);
return;
@@ -106,7 +107,7 @@ client_new(EventLoop &loop, Partition &partition,
(void)send(fd, GREETING, sizeof(GREETING) - 1, 0);
- client_list_add(client);
+ client_list->Add(*client);
remote = sockaddr_to_string(sa, sa_length, NULL);
g_log(G_LOG_DOMAIN, LOG_LEVEL_SECURE,
@@ -117,7 +118,7 @@ client_new(EventLoop &loop, Partition &partition,
void
Client::Close()
{
- client_list_remove(this);
+ client_list->Remove(*this);
SetExpired();