Browse Source

Remove more server override cruft

Branan Purvine-Riley 14 years ago
parent
commit
7897fb726e
  1. 13
      Sources/Plasma/Apps/plClient/winmain.cpp
  2. 12
      Sources/Plasma/NucleusLib/pnNetBase/Private/pnNbSrvs.cpp
  3. 2
      Sources/Plasma/NucleusLib/pnNetBase/Private/pnNbSrvs.h
  4. 2
      Sources/Plasma/PubUtilLib/plNetClientComm/plNetClientComm.cpp

13
Sources/Plasma/Apps/plClient/winmain.cpp

@ -1581,21 +1581,20 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nC
si.cb = sizeof(si);
wchar cmdLine[MAX_PATH];
const wchar ** addrs;
unsigned count;
if (!eventExists) // if it is missing, assume patcher wasn't launched
{
StrCopy(cmdLine, s_patcherExeName, arrsize(cmdLine));
count = GetAuthSrvHostnames(&addrs);
if(count && AuthSrvHostnameOverride())
GetAuthSrvHostnames(&addrs);
if(wcslen(addrs[0]))
StrPrintf(cmdLine, arrsize(cmdLine), L"%ws /AuthSrv=%ws", cmdLine, addrs[0]);
count = GetFileSrvHostnames(&addrs);
if(count && FileSrvHostnameOverride())
GetFileSrvHostnames(&addrs);
if(wcslen(addrs[0]))
StrPrintf(cmdLine, arrsize(cmdLine), L"%ws /FileSrv=%ws", cmdLine, addrs[0]);
count = GetGateKeeperSrvHostnames(&addrs);
if(count && GateKeeperSrvHostnameOverride())
GetGateKeeperSrvHostnames(&addrs);
if(wcslen(addrs[0]))
StrPrintf(cmdLine, arrsize(cmdLine), L"%ws /GateKeeperSrv=%ws", cmdLine, addrs[0]);
if(!CreateProcessW(NULL, cmdLine, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi))

12
Sources/Plasma/NucleusLib/pnNetBase/Private/pnNbSrvs.cpp

@ -88,12 +88,6 @@ void SetAuthSrvHostname (const wchar addr[]) {
StrCopy(s_authAddrConsole, addr, arrsize(s_authAddrConsole));
}
//============================================================================
bool AuthSrvHostnameOverride () {
return s_authAddrConsole[0];
}
//============================================================================
// File
//============================================================================
@ -109,12 +103,6 @@ void SetFileSrvHostname (const wchar addr[]) {
StrCopy(s_fileAddrConsole, addr, arrsize(s_fileAddrConsole));
}
//============================================================================
bool FileSrvHostnameOverride () {
return s_fileAddrConsole[0];
}
//============================================================================
// Csr
//============================================================================

2
Sources/Plasma/NucleusLib/pnNetBase/Private/pnNbSrvs.h

@ -75,11 +75,9 @@ enum ESrvType {
unsigned GetAuthSrvHostnames (const wchar *** addrs); // returns addrCount
void SetAuthSrvHostname (const wchar addr[]);
bool AuthSrvHostnameOverride ();
unsigned GetFileSrvHostnames (const wchar *** addrs); // returns addrCount
void SetFileSrvHostname (const wchar addr[]);
bool FileSrvHostnameOverride ();
unsigned GetCsrSrvHostnames (const wchar *** addrs); // returns addrCount
void SetCsrSrvHostname (const wchar addr[]);

2
Sources/Plasma/PubUtilLib/plNetClientComm/plNetClientComm.cpp

@ -986,7 +986,7 @@ void NetCommConnect () {
if (!gDataServerLocal) {
// if a console override was specified for a filesrv, connect directly to the fileserver rather than going through the gatekeeper
if(GetFileSrvHostnames(&addrs) && FileSrvHostnameOverride())
if(GetFileSrvHostnames(&addrs) && wcslen(addrs[0]))
{
NetCliFileStartConnect(addrs, count);
}

Loading…
Cancel
Save