IniFile: Added common code to migrate ports.
Old settings have IPv4 and IPv6 ports as separate values, new settings have a single value for the ports.
This commit is contained in:
@@ -15,9 +15,7 @@
|
||||
!! MODIFIED BY FAKETRUTH and madmaxoft!!
|
||||
*/
|
||||
|
||||
#ifndef CIniFile_H
|
||||
#define CIniFile_H
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
|
||||
@@ -215,4 +213,22 @@ public:
|
||||
|
||||
// tolua_end
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
/** Reads the list of ports from the INI file, possibly upgrading from IPv4/IPv6-specific values into new version-agnostic value.
|
||||
Reads the list of ports from a_PortsValueName. If that value doesn't exist or is empty, the list is combined from values
|
||||
in a_OldIPv4ValueName and a_OldIPv6ValueName; in this case the old values are removed from the INI file.
|
||||
If there is none of the three values or they are all empty, the default is used and stored in the Ports value. */
|
||||
AStringVector ReadUpgradeIniPorts(
|
||||
cIniFile & a_IniFile,
|
||||
const AString & a_KeyName,
|
||||
const AString & a_PortsValueName,
|
||||
const AString & a_OldIPv4ValueName,
|
||||
const AString & a_OldIPv6ValueName,
|
||||
const AString & a_DefaultValue
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user