summaryrefslogtreecommitdiff
path: root/src/command/ClientCommands.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/command/ClientCommands.cxx')
-rw-r--r--src/command/ClientCommands.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/command/ClientCommands.cxx b/src/command/ClientCommands.cxx
index f0e3470be..01bd462f2 100644
--- a/src/command/ClientCommands.cxx
+++ b/src/command/ClientCommands.cxx
@@ -41,6 +41,21 @@ handle_ping([[maybe_unused]] Client &client, [[maybe_unused]] Request args,
}
CommandResult
+handle_binary_limit(Client &client, Request args,
+ [[maybe_unused]] Response &r)
+{
+ size_t value = args.ParseUnsigned(0, client.GetOutputMaxSize() - 4096);
+ if (value < 64) {
+ r.Error(ACK_ERROR_ARG, "Value too small");
+ return CommandResult::ERROR;
+ }
+
+ client.binary_limit = value;
+
+ return CommandResult::OK;
+}
+
+CommandResult
handle_password(Client &client, Request args, Response &r)
{
unsigned permission = 0;