Skip to content

Commit

Permalink
Sort interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
uweseimet committed Aug 27, 2023
1 parent e8fbf06 commit 7015620
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions cpp/devices/device_factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,20 @@ DeviceFactory::DeviceFactory()
sector_sizes[SCMO] = { 512, 1024, 2048, 4096 };
sector_sizes[SCCD] = { 512, 2048};

string network_interfaces;
for (const auto& network_interface : GetNetworkInterfaces()) {
if (!network_interfaces.empty()) {
network_interfaces += ",";
vector<string> network_interfaces = GetNetworkInterfaces();
sort(network_interfaces.begin(), network_interfaces.end());

string interfaces;
for (const auto& network_interface : network_interfaces) {
if (!interfaces.empty()) {
interfaces += ",";
}
network_interfaces += network_interface;
interfaces += network_interface;
}

default_params[SCBR]["interface"] = network_interfaces;
default_params[SCBR]["interface"] = interfaces;
default_params[SCBR]["inet"] = DEFAULT_IP;
default_params[SCDP]["interface"] = network_interfaces;
default_params[SCDP]["interface"] = interfaces;
default_params[SCDP]["inet"] = DEFAULT_IP;
default_params[SCLP]["cmd"] = "lp -oraw %f";

Expand Down

0 comments on commit 7015620

Please sign in to comment.