Commit 16b260e3 authored by Max Kellermann's avatar Max Kellermann

Client: eliminate client_puts(), use Client::Write() instead

parent 3102e05d
...@@ -215,11 +215,6 @@ client_new(EventLoop &loop, Partition &partition, ...@@ -215,11 +215,6 @@ client_new(EventLoop &loop, Partition &partition,
int fd, SocketAddress address, int uid); 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. * Write a printf-like formatted string to the client.
*/ */
void client_vprintf(Client &client, const char *fmt, va_list args); void client_vprintf(Client &client, const char *fmt, va_list args);
......
...@@ -40,7 +40,7 @@ Client::IdleNotify() ...@@ -40,7 +40,7 @@ Client::IdleNotify()
idle_names[i]); idle_names[i]);
} }
client_puts(*this, "OK\n"); Write("OK\n");
TimeoutMonitor::Schedule(client_timeout); TimeoutMonitor::Schedule(client_timeout);
} }
......
...@@ -44,7 +44,7 @@ client_process_command_list(Client &client, bool list_ok, ...@@ -44,7 +44,7 @@ client_process_command_list(Client &client, bool list_ok,
if (ret != CommandResult::OK || client.IsExpired()) if (ret != CommandResult::OK || client.IsExpired())
break; break;
else if (list_ok) else if (list_ok)
client_puts(client, "list_OK\n"); client.Write("list_OK\n");
} }
return ret; return ret;
......
...@@ -38,12 +38,6 @@ Client::Write(const char *data) ...@@ -38,12 +38,6 @@ Client::Write(const char *data)
} }
void void
client_puts(Client &client, const char *s)
{
client.Write(s);
}
void
client_vprintf(Client &client, const char *fmt, va_list args) client_vprintf(Client &client, const char *fmt, va_list args)
{ {
client.Write(FormatStringV(fmt, args).c_str()); client.Write(FormatStringV(fmt, args).c_str());
......
...@@ -24,5 +24,5 @@ ...@@ -24,5 +24,5 @@
void void
command_success(Client &client) command_success(Client &client)
{ {
client_puts(client, "OK\n"); client.Write("OK\n");
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment