1
0

Add support for setting ports through command line

This commit is contained in:
tycho
2015-05-18 16:04:27 +01:00
parent c2303ac4cf
commit 2e98bfc4e9
2 changed files with 24 additions and 2 deletions

View File

@@ -931,7 +931,18 @@ AStringVector ReadUpgradeIniPorts(
)
{
// Read the regular value, but don't use the default (in order to detect missing value for upgrade):
AStringVector Ports = StringSplitAndTrim(a_Settings.GetValue(a_KeyName, a_PortsValueName), ";,");
AStringVector Ports;
for (auto pair : a_Settings.GetValues(a_KeyName))
{
if (pair.first != a_PortsValueName)
{
continue;
}
AStringVector temp = StringSplitAndTrim(pair.second, ";,");
Ports.insert(Ports.end(), temp.begin(), temp.end());
}
if (Ports.empty())
{