Client: add "playlist" attribute

Reduce access to the global variable "g_playlist".
This commit is contained in:
Max Kellermann
2013-01-04 23:07:11 +01:00
parent b0833084a6
commit fe8e77e556
7 changed files with 84 additions and 64 deletions

View File

@@ -20,6 +20,7 @@
#include "config.h"
#include "Listen.hxx"
#include "Main.hxx"
#include "Playlist.hxx"
#include "Client.hxx"
extern "C" {
@@ -46,7 +47,8 @@ static void
listen_callback(int fd, const struct sockaddr *address,
size_t address_length, int uid, G_GNUC_UNUSED void *ctx)
{
client_new(global_player_control, fd, address, address_length, uid);
client_new(g_playlist, global_player_control,
fd, address, address_length, uid);
}
static bool