aboutsummaryrefslogtreecommitdiffstats
path: root/src/Main.cxx
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Main.cxx11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/Main.cxx b/src/Main.cxx
index 917d89457..e70e5f908 100644
--- a/src/Main.cxx
+++ b/src/Main.cxx
@@ -31,8 +31,8 @@
#include "DatabaseSimple.hxx"
#include "Permission.hxx"
#include "Listen.hxx"
-#include "ClientIdle.hxx"
#include "Client.hxx"
+#include "ClientList.hxx"
#include "AllCommands.hxx"
#include "Partition.hxx"
#include "Volume.hxx"
@@ -99,6 +99,8 @@ enum {
GThread *main_task;
EventLoop *main_loop;
+ClientList *client_list;
+
Partition *global_partition;
static StateFile *state_file;
@@ -330,7 +332,7 @@ idle_event_emitted(void)
clients */
unsigned flags = idle_get();
if (flags != 0)
- client_manager_idle_add(flags);
+ client_list->IdleAdd(flags);
}
/**
@@ -401,6 +403,9 @@ int mpd_main(int argc, char *argv[])
main_task = g_thread_self();
main_loop = new EventLoop(EventLoop::Default());
+ const unsigned max_clients = config_get_positive(CONF_MAX_CONN, 10);
+ client_list = new ClientList(max_clients);
+
success = listen_global_init(&error);
if (!success) {
g_warning("%s", error->message);
@@ -532,8 +537,8 @@ int mpd_main(int argc, char *argv[])
pc_kill(&global_partition->pc);
finishZeroconf();
- client_manager_deinit();
listen_global_finish();
+ delete client_list;
start = clock();
DatabaseGlobalDeinit();