aboutsummaryrefslogtreecommitdiffstats
path: root/src/RemoteControl.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2014-02-14 15:51:02 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2014-02-14 16:11:43 +0100
commit35670b8021a6f8c3a2ab742aecb5ef41bc1c73d2 (patch)
treebd6f93056b4d28f14b0413fb3b94362e12f322c5 /src/RemoteControl.cpp
parentd6923be4bd2e198b4cba161e8040072128bd392c (diff)
downloaddabmux-35670b8021a6f8c3a2ab742aecb5ef41bc1c73d2.tar.gz
dabmux-35670b8021a6f8c3a2ab742aecb5ef41bc1c73d2.tar.bz2
dabmux-35670b8021a6f8c3a2ab742aecb5ef41bc1c73d2.zip
correct RC mistakes
Diffstat (limited to 'src/RemoteControl.cpp')
-rw-r--r--src/RemoteControl.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/RemoteControl.cpp b/src/RemoteControl.cpp
index 3c1c24a..a075497 100644
--- a/src/RemoteControl.cpp
+++ b/src/RemoteControl.cpp
@@ -179,9 +179,18 @@ RemoteControllerTelnet::dispatch_command(tcp::socket& socket, string command)
}
}
else if (cmd[0] == "set") {
- if (cmd.size() == 4) {
+ if (cmd.size() >= 4) {
try {
- set_param_(cmd[1], cmd[2], cmd[3]);
+ stringstream new_param_value;
+ for (int i = 3; i < cmd.size(); i++) {
+ new_param_value << cmd[i];
+
+ if (i+1 < cmd.size()) {
+ new_param_value << " ";
+ }
+ }
+
+ set_param_(cmd[1], cmd[2], new_param_value.str());
reply(socket, "ok");
}
catch (ParameterError &e) {
@@ -193,7 +202,7 @@ RemoteControllerTelnet::dispatch_command(tcp::socket& socket, string command)
}
else
{
- reply(socket, "Incorrect parameters for command 'get'");
+ reply(socket, "Incorrect parameters for command 'set'");
}
}
else if (cmd[0] == "quit") {