mirror of
https://github.com/akuker/RASCSI.git
synced 2024-11-25 20:33:35 +00:00
Fixed wrong parameter name
This commit is contained in:
parent
7efed1a239
commit
26c6a902f1
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user