This commit is contained in:
Uwe Seimet
2021-08-25 08:48:57 +02:00
parent 02534565f1
commit 1f0aa910c8

View File

@@ -221,27 +221,27 @@ void CommandServerInfo(const string& hostname, int port)
cout << " Properties: "; cout << " Properties: ";
if (types_properties.properties_size()) { if (types_properties.properties_size()) {
for (int j = 0; j < types_properties.properties_size(); j++) { for (int j = 0; j < types_properties.properties_size(); j++) {
bool has_feature = false; bool has_property = false;
PbDeviceProperties properties = types_properties.properties(j); PbDeviceProperties properties = types_properties.properties(j);
if (properties.read_only()) { if (properties.read_only()) {
cout << "Read-only"; cout << "Read-only";
has_feature = true; has_property = true;
} }
if (properties.protectable()) { if (properties.protectable()) {
cout << (has_feature ? ", " : "") << "Protectable"; cout << (has_property ? ", " : "") << "Protectable";
has_feature = true; has_property = true;
} }
if (properties.removable()) { if (properties.removable()) {
cout << (has_feature ? ", " : "") << "Removable"; cout << (has_property ? ", " : "") << "Removable";
has_feature = true; has_property = true;
} }
if (properties.lockable()) { if (properties.lockable()) {
cout << (has_feature ? ", " : "") << "Lockable"; cout << (has_property ? ", " : "") << "Lockable";
has_feature = true; has_property = true;
} }
if (properties.supports_file()) { if (properties.supports_file()) {
cout << (has_feature ? ", " : "") << "Image file support"; cout << (has_property ? ", " : "") << "Image file support";
} }
cout << endl; cout << endl;
} }