mirror of
https://github.com/OpenVPN/openvpn3.git
synced 2024-09-20 12:12:15 +02:00
Objective C++: fix symbol conflicts.
Do some trivial renaming to prevent symbol conflicts when the OpenVPN 3 client is compiled as Objective C++ with CoreFoundation.h. Signed-off-by: James Yonan <james@openvpn.net>
This commit is contained in:
parent
8f63cbbb6f
commit
4fcc99c37f
@ -448,7 +448,7 @@ namespace openvpn {
|
||||
// IPv6
|
||||
{
|
||||
const unsigned int n = push_base->singleton.extend(opt, "block-ipv6");
|
||||
if (!n && config.ipv6() == IPv6Setting::NO)
|
||||
if (!n && config.ipv6() == IPv6Setting::No)
|
||||
push_base->singleton.emplace_back("block-ipv6");
|
||||
}
|
||||
}
|
||||
@ -463,9 +463,9 @@ namespace openvpn {
|
||||
PeerInfo::Set::Ptr pi(new PeerInfo::Set);
|
||||
|
||||
// IPv6
|
||||
if (config.ipv6() == IPv6Setting::NO)
|
||||
if (config.ipv6() == IPv6Setting::No)
|
||||
pi->emplace_back("IV_IPv6", "0");
|
||||
else if (config.ipv6() == IPv6Setting::YES)
|
||||
else if (config.ipv6() == IPv6Setting::Yes)
|
||||
pi->emplace_back("IV_IPv6", "1");
|
||||
|
||||
// autologin sessions
|
||||
|
@ -29,9 +29,9 @@ namespace openvpn {
|
||||
{
|
||||
public:
|
||||
enum Type {
|
||||
NO,
|
||||
YES,
|
||||
DEFAULT,
|
||||
No,
|
||||
Yes,
|
||||
Default,
|
||||
};
|
||||
|
||||
IPv6Setting()
|
||||
@ -49,11 +49,11 @@ namespace openvpn {
|
||||
{
|
||||
switch (type_)
|
||||
{
|
||||
case NO:
|
||||
case No:
|
||||
return "no";
|
||||
case YES:
|
||||
case Yes:
|
||||
return "yes";
|
||||
case DEFAULT:
|
||||
case Default:
|
||||
default:
|
||||
return "default";
|
||||
}
|
||||
@ -62,11 +62,11 @@ namespace openvpn {
|
||||
static IPv6Setting parse(const std::string& str)
|
||||
{
|
||||
if (str == "no")
|
||||
return IPv6Setting(NO);
|
||||
return IPv6Setting(No);
|
||||
else if (str == "yes")
|
||||
return IPv6Setting(YES);
|
||||
return IPv6Setting(Yes);
|
||||
else if (str == "default")
|
||||
return IPv6Setting(DEFAULT);
|
||||
return IPv6Setting(Default);
|
||||
else
|
||||
throw Exception("IPv6Setting: unrecognized setting: '" + str + '\'');
|
||||
}
|
||||
@ -82,7 +82,7 @@ namespace openvpn {
|
||||
}
|
||||
|
||||
private:
|
||||
Type type_ = DEFAULT;
|
||||
Type type_ = Default;
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user