Skip to content

Commit 108cef6

Browse files
committed
rename environment variable for preference
1 parent c19d93a commit 108cef6

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

FlashpointSecurePlayer/FlashpointProxy.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,8 @@ public static void GetPreferences(out bool proxy, out int port) {
155155
portFile = flashpointProxyElement.Port;
156156
}
157157

158+
long preference = PREFERENCE_DEFAULT;
159+
158160
// try getting from the proxy element
159161
// if that fails, try from the environment variables
160162
// if that fails, use the default
@@ -167,8 +169,8 @@ public static void GetPreferences(out bool proxy, out int port) {
167169
// fail silently
168170
}
169171

170-
if (long.TryParse(proxyEnvironmentVariable, out long _proxy) && _proxy != PREFERENCE_DEFAULT) {
171-
proxy = _proxy != 0;
172+
if (long.TryParse(proxyEnvironmentVariable, out preference) && preference != PREFERENCE_DEFAULT) {
173+
proxy = preference != 0;
172174
} else {
173175
proxy = FP_PROXY_DEFAULT;
174176
}
@@ -185,8 +187,8 @@ public static void GetPreferences(out bool proxy, out int port) {
185187
// fail silently
186188
}
187189

188-
if (long.TryParse(portEnvironmentVariable, out long _port) && _port != PREFERENCE_DEFAULT) {
189-
port = (int)_port;
190+
if (long.TryParse(portEnvironmentVariable, out preference) && preference != PREFERENCE_DEFAULT) {
191+
port = (int)preference;
190192
} else {
191193
port = FP_PROXY_PORT_DEFAULT;
192194
}

0 commit comments

Comments
 (0)