From 7897fb726e49cc6c16fde2b65f151d882150bedb Mon Sep 17 00:00:00 2001 From: Branan Purvine-Riley Date: Thu, 5 May 2011 13:53:37 -0700 Subject: [PATCH] Remove more server override cruft --- Sources/Plasma/Apps/plClient/winmain.cpp | 13 ++++++------- .../NucleusLib/pnNetBase/Private/pnNbSrvs.cpp | 12 ------------ .../Plasma/NucleusLib/pnNetBase/Private/pnNbSrvs.h | 2 -- .../PubUtilLib/plNetClientComm/plNetClientComm.cpp | 2 +- 4 files changed, 7 insertions(+), 22 deletions(-) diff --git a/Sources/Plasma/Apps/plClient/winmain.cpp b/Sources/Plasma/Apps/plClient/winmain.cpp index b8a0e5b2..48bed6f2 100644 --- a/Sources/Plasma/Apps/plClient/winmain.cpp +++ b/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)) diff --git a/Sources/Plasma/NucleusLib/pnNetBase/Private/pnNbSrvs.cpp b/Sources/Plasma/NucleusLib/pnNetBase/Private/pnNbSrvs.cpp index d603c41a..62accab6 100644 --- a/Sources/Plasma/NucleusLib/pnNetBase/Private/pnNbSrvs.cpp +++ b/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 //============================================================================ diff --git a/Sources/Plasma/NucleusLib/pnNetBase/Private/pnNbSrvs.h b/Sources/Plasma/NucleusLib/pnNetBase/Private/pnNbSrvs.h index ad3557fa..2887c5bb 100644 --- a/Sources/Plasma/NucleusLib/pnNetBase/Private/pnNbSrvs.h +++ b/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[]); diff --git a/Sources/Plasma/PubUtilLib/plNetClientComm/plNetClientComm.cpp b/Sources/Plasma/PubUtilLib/plNetClientComm/plNetClientComm.cpp index f19eb046..29a003a8 100644 --- a/Sources/Plasma/PubUtilLib/plNetClientComm/plNetClientComm.cpp +++ b/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); }