aboutsummaryrefslogtreecommitdiffstats
path: root/src/ClientNew.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/ClientNew.cxx')
-rw-r--r--src/ClientNew.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/ClientNew.cxx b/src/ClientNew.cxx
index 1579b9a53..489af8c31 100644
--- a/src/ClientNew.cxx
+++ b/src/ClientNew.cxx
@@ -19,6 +19,7 @@
#include "config.h"
#include "ClientInternal.hxx"
+#include "Partition.hxx"
#include "fd_util.h"
extern "C" {
#include "fifo_buffer.h"
@@ -45,10 +46,10 @@ extern "C" {
static const char GREETING[] = "OK MPD " PROTOCOL_VERSION "\n";
-Client::Client(struct playlist &_playlist,
- struct player_control *_player_control,
+Client::Client(Partition &_partition,
int fd, int _uid, int _num)
- :playlist(_playlist), player_control(_player_control),
+ :partition(_partition),
+ playlist(partition.playlist), player_control(&partition.pc),
input(fifo_buffer_new(4096)),
permission(getDefaultPermissions()),
uid(_uid),
@@ -94,13 +95,12 @@ Client::~Client()
}
void
-client_new(struct playlist &playlist, struct player_control *player_control,
+client_new(Partition &partition,
int fd, const struct sockaddr *sa, size_t sa_length, int uid)
{
static unsigned int next_client_num;
char *remote;
- assert(player_control != NULL);
assert(fd >= 0);
#ifdef HAVE_LIBWRAP
@@ -134,7 +134,7 @@ client_new(struct playlist &playlist, struct player_control *player_control,
return;
}
- Client *client = new Client(playlist, player_control, fd, uid,
+ Client *client = new Client(partition, fd, uid,
next_client_num++);
(void)send(fd, GREETING, sizeof(GREETING) - 1, 0);