diff options
author | Max Kellermann <max@duempel.org> | 2013-01-15 10:11:08 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-01-15 10:59:28 +0100 |
commit | 1e2018ce831654f5bf649c5ae4d2e9b003c5a52e (patch) | |
tree | 3b9a26135f1a2598f0dcf77f72ea2beb7cb59162 /src/ClientEvent.cxx | |
parent | 3fcf17cb79c1bbec631c1a440eb05953ece87b0d (diff) | |
download | mpd-1e2018ce831654f5bf649c5ae4d2e9b003c5a52e.tar.gz mpd-1e2018ce831654f5bf649c5ae4d2e9b003c5a52e.tar.xz mpd-1e2018ce831654f5bf649c5ae4d2e9b003c5a52e.zip |
Client: move connection functions into the class
Diffstat (limited to '')
-rw-r--r-- | src/ClientEvent.cxx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/ClientEvent.cxx b/src/ClientEvent.cxx index fe967f93b..1e06ad48a 100644 --- a/src/ClientEvent.cxx +++ b/src/ClientEvent.cxx @@ -30,17 +30,17 @@ client_out_event(G_GNUC_UNUSED GIOChannel *source, GIOCondition condition, { Client *client = (Client *)data; - assert(!client_is_expired(client)); + assert(!client->IsExpired()); if (condition != G_IO_OUT) { - client_set_expired(client); + client->SetExpired(); return false; } client_write_deferred(client); - if (client_is_expired(client)) { - client_close(client); + if (client->IsExpired()) { + client->Close(); return false; } @@ -66,10 +66,10 @@ client_in_event(G_GNUC_UNUSED GIOChannel *source, GIOCondition condition, Client *client = (Client *)data; enum command_return ret; - assert(!client_is_expired(client)); + assert(!client->IsExpired()); if (condition != G_IO_IN) { - client_set_expired(client); + client->SetExpired(); return false; } @@ -83,17 +83,17 @@ client_in_event(G_GNUC_UNUSED GIOChannel *source, GIOCondition condition, break; case COMMAND_RETURN_KILL: - client_close(client); + client->Close(); main_loop->Break(); return false; case COMMAND_RETURN_CLOSE: - client_close(client); + client->Close(); return false; } - if (client_is_expired(client)) { - client_close(client); + if (client->IsExpired()) { + client->Close(); return false; } |