diff options
author | Max Kellermann <max@musicpd.org> | 2017-02-03 20:46:53 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2017-02-03 20:46:53 +0100 |
commit | 16b260e3718d4ac9475383ba5582cd8c3a3a8643 (patch) | |
tree | d66653bc4486ce92d9d15d9cd1cb20be835e71e9 | |
parent | 3102e05da4e64b8ea32b9d8fca01a512979bedd7 (diff) |
Client: eliminate client_puts(), use Client::Write() instead
-rw-r--r-- | src/client/Client.hxx | 5 | ||||
-rw-r--r-- | src/client/ClientIdle.cxx | 2 | ||||
-rw-r--r-- | src/client/ClientProcess.cxx | 2 | ||||
-rw-r--r-- | src/client/ClientWrite.cxx | 6 | ||||
-rw-r--r-- | src/protocol/Result.cxx | 2 |
5 files changed, 3 insertions, 14 deletions
diff --git a/src/client/Client.hxx b/src/client/Client.hxx index 960984296..d1b0d1752 100644 --- a/src/client/Client.hxx +++ b/src/client/Client.hxx @@ -215,11 +215,6 @@ client_new(EventLoop &loop, Partition &partition, int fd, SocketAddress address, int uid); /** - * Write a C string to the client. - */ -void client_puts(Client &client, const char *s); - -/** * Write a printf-like formatted string to the client. */ void client_vprintf(Client &client, const char *fmt, va_list args); diff --git a/src/client/ClientIdle.cxx b/src/client/ClientIdle.cxx index ca562233f..2791bb9a4 100644 --- a/src/client/ClientIdle.cxx +++ b/src/client/ClientIdle.cxx @@ -40,7 +40,7 @@ Client::IdleNotify() idle_names[i]); } - client_puts(*this, "OK\n"); + Write("OK\n"); TimeoutMonitor::Schedule(client_timeout); } diff --git a/src/client/ClientProcess.cxx b/src/client/ClientProcess.cxx index 4d0efbf73..b5591cd1b 100644 --- a/src/client/ClientProcess.cxx +++ b/src/client/ClientProcess.cxx @@ -44,7 +44,7 @@ client_process_command_list(Client &client, bool list_ok, if (ret != CommandResult::OK || client.IsExpired()) break; else if (list_ok) - client_puts(client, "list_OK\n"); + client.Write("list_OK\n"); } return ret; diff --git a/src/client/ClientWrite.cxx b/src/client/ClientWrite.cxx index 965d70bd6..963c4d40a 100644 --- a/src/client/ClientWrite.cxx +++ b/src/client/ClientWrite.cxx @@ -38,12 +38,6 @@ Client::Write(const char *data) } void -client_puts(Client &client, const char *s) -{ - client.Write(s); -} - -void client_vprintf(Client &client, const char *fmt, va_list args) { client.Write(FormatStringV(fmt, args).c_str()); diff --git a/src/protocol/Result.cxx b/src/protocol/Result.cxx index b58fcaea0..f43a3f156 100644 --- a/src/protocol/Result.cxx +++ b/src/protocol/Result.cxx @@ -24,5 +24,5 @@ void command_success(Client &client) { - client_puts(client, "OK\n"); + client.Write("OK\n"); } |