From 26c6a902f1e40f37c3207ce3011e5052d02af07b Mon Sep 17 00:00:00 2001 From: Uwe Seimet Date: Sat, 18 Sep 2021 08:53:02 +0200 Subject: [PATCH] Fixed wrong parameter name --- src/raspberrypi/rasctl.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/raspberrypi/rasctl.cpp b/src/raspberrypi/rasctl.cpp index 38a89b41..a6f0867a 100644 --- a/src/raspberrypi/rasctl.cpp +++ b/src/raspberrypi/rasctl.cpp @@ -142,7 +142,12 @@ void DisplayDeviceInfo(const PbDevice& pb_device) cout << " "; } + bool isFirst = true; for (const auto& param : pb_device.params()) { + if (!isFirst) { + cout << " "; + } + isFirst = false; cout << param.first << "=" << param.second; } @@ -561,6 +566,7 @@ int main(int argc, char* argv[]) device->set_id(-1); const char *hostname = "localhost"; int port = 6868; + string param; string log_level; string default_folder; string reserved_ids; @@ -607,7 +613,7 @@ int main(int argc, char* argv[]) break; case 'f': - AddParam(*device, "file", optarg); + param = optarg; break; case 't': @@ -748,6 +754,15 @@ int main(int argc, char* argv[]) exit(EXIT_SUCCESS); } + if (!param.empty()) { + if (device->type() == SCBR || device->type() == SCDP) { + AddParam(*device, "interfaces", param); + } + else { + AddParam(*device, "file", param); + } + } + PbResult result; SendCommand(hostname, port, command, result);