diff options
Diffstat (limited to '')
-rw-r--r-- | src/ClientEvent.cxx (renamed from src/client_event.c) | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/client_event.c b/src/ClientEvent.cxx index 4f54ae0a7..aacd01cfe 100644 --- a/src/client_event.c +++ b/src/ClientEvent.cxx @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2011 The Music Player Daemon Project + * Copyright (C) 2003-2013 The Music Player Daemon Project * http://www.musicpd.org * * This program is free software; you can redistribute it and/or modify @@ -18,8 +18,8 @@ */ #include "config.h" -#include "client_internal.h" -#include "main.h" +#include "ClientInternal.hxx" +#include "Main.hxx" #include <assert.h> @@ -27,7 +27,7 @@ static gboolean client_out_event(G_GNUC_UNUSED GIOChannel *source, GIOCondition condition, gpointer data) { - struct client *client = data; + Client *client = (Client *)data; assert(!client_is_expired(client)); @@ -49,7 +49,7 @@ client_out_event(G_GNUC_UNUSED GIOChannel *source, GIOCondition condition, /* done sending deferred buffers exist: schedule read */ client->source_id = g_io_add_watch(client->channel, - G_IO_IN|G_IO_ERR|G_IO_HUP, + GIOCondition(G_IO_IN|G_IO_ERR|G_IO_HUP), client_in_event, client); return false; } @@ -62,7 +62,7 @@ gboolean client_in_event(G_GNUC_UNUSED GIOChannel *source, GIOCondition condition, gpointer data) { - struct client *client = data; + Client *client = (Client *)data; enum command_return ret; assert(!client_is_expired(client)); @@ -77,6 +77,7 @@ client_in_event(G_GNUC_UNUSED GIOChannel *source, GIOCondition condition, ret = client_read(client); switch (ret) { case COMMAND_RETURN_OK: + case COMMAND_RETURN_IDLE: case COMMAND_RETURN_ERROR: break; @@ -98,7 +99,7 @@ client_in_event(G_GNUC_UNUSED GIOChannel *source, GIOCondition condition, if (!g_queue_is_empty(client->deferred_send)) { /* deferred buffers exist: schedule write */ client->source_id = g_io_add_watch(client->channel, - G_IO_OUT|G_IO_ERR|G_IO_HUP, + GIOCondition(G_IO_OUT|G_IO_ERR|G_IO_HUP), client_out_event, client); return false; } |