Browse Source

Remove old hard-coded addresses

Michael Hansen 14 years ago
parent
commit
563eebd560
  1. 159
      Sources/Plasma/NucleusLib/pnNetBase/Private/pnNbSrvs.cpp
  2. 2
      Sources/Plasma/NucleusLib/pnNetBase/Private/pnNbSrvs.h
  3. 2
      Sources/Plasma/PubUtilLib/plNetClientComm/plNetClientComm.cpp

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

@ -43,107 +43,27 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*
***/
//============================================================================
// Auth
//============================================================================
static wchar s_authAddrConsole[64] = {0};
static const wchar * s_authAddrs[] = {
#if BUILD_TYPE == BUILD_TYPE_DEV
L"shard"
#elif BUILD_TYPE == BUILD_TYPE_QA
L"marrim"
#elif BUILD_TYPE == BUILD_TYPE_TEST
L"test-auth.urulive.com"
#elif BUILD_TYPE == BUILD_TYPE_BETA
L"beta-auth.urulive.com"
#elif BUILD_TYPE == BUILD_TYPE_LIVE
L"184.73.198.22" //L"auth.urulive.com"
#else
# error "Unknown build type"
#endif
};
static wchar s_authAddrCmdLine[64];
static const wchar * s_authAddrsOverride[] = {
s_authAddrCmdLine
s_authAddrConsole
};
//============================================================================
// File
//============================================================================
static wchar s_fileAddrConsole[64] = {0};
static const wchar * s_fileAddrs[] = {
#if BUILD_TYPE == BUILD_TYPE_DEV
L"shard"
#elif BUILD_TYPE == BUILD_TYPE_QA
L"marrim"
#elif BUILD_TYPE == BUILD_TYPE_TEST
L"test-file.urulive.com"
#elif BUILD_TYPE == BUILD_TYPE_BETA
L"beta-file.urulive.com"
#elif BUILD_TYPE == BUILD_TYPE_LIVE
L"67.202.54.141" //unused
#else
# error "Unknown build type"
#endif
};
static wchar s_fileAddrCmdLine[64];
static const wchar * s_fileAddrsOverride[] = {
s_fileAddrCmdLine
s_fileAddrConsole
};
//============================================================================
// Csr
//============================================================================
static wchar s_csrAddrConsole[64] = {0};
static const wchar * s_csrAddrs[] = {
#if BUILD_TYPE == BUILD_TYPE_DEV
L"localhost"
#elif BUILD_TYPE == BUILD_TYPE_QA
L"localhost"
#elif BUILD_TYPE == BUILD_TYPE_TEST
L"localhost"
#elif BUILD_TYPE == BUILD_TYPE_BETA
L"beta-csr.urulive.com"
#elif BUILD_TYPE == BUILD_TYPE_LIVE
L"localhost"
#else
# error "Unknown build type"
#endif
};
static wchar s_csrAddrCmdLine[64];
static const wchar * s_csrAddrsOverride[] = {
s_csrAddrCmdLine
s_csrAddrConsole
};
//============================================================================
// GateKeeper
//============================================================================
static wchar s_gateKeeperAddrConsole[64] = {0};
static const wchar * s_gateKeeperAddrs[] = {
#if BUILD_TYPE == BUILD_TYPE_DEV
L"localhost"
#elif BUILD_TYPE == BUILD_TYPE_QA
L"localhost"
#elif BUILD_TYPE == BUILD_TYPE_TEST
L"localhost"
#elif BUILD_TYPE == BUILD_TYPE_BETA
L"beta-csr.urulive.com"
#elif BUILD_TYPE == BUILD_TYPE_LIVE
L"184.73.198.22"
#else
# error "Unknown build type"
#endif
};
static wchar s_gateKeeperAddrCmdLine[64];
static const wchar * s_gateKeeperAddrsOverride[] = {
s_gateKeeperAddrCmdLine
s_gateKeeperAddrConsole
};
@ -158,26 +78,20 @@ static const wchar * s_gateKeeperAddrsOverride[] = {
//============================================================================
unsigned GetAuthSrvHostnames (const wchar *** addrs) {
if (s_authAddrCmdLine[0]) {
*addrs = s_authAddrsOverride;
return arrsize(s_authAddrsOverride);
}
else {
*addrs = s_authAddrs;
return arrsize(s_authAddrs);
}
*addrs = s_authAddrs;
return arrsize(s_authAddrs);
}
//============================================================================
void SetAuthSrvHostname (const wchar addr[]) {
StrCopy(s_authAddrCmdLine, addr, arrsize(s_authAddrCmdLine));
StrCopy(s_authAddrConsole, addr, arrsize(s_authAddrConsole));
}
//============================================================================
bool AuthSrvHostnameOverride () {
return s_authAddrCmdLine[0];
return s_authAddrConsole[0];
}
//============================================================================
@ -185,26 +99,20 @@ bool AuthSrvHostnameOverride () {
//============================================================================
unsigned GetFileSrvHostnames (const wchar *** addrs) {
if (s_fileAddrCmdLine[0]) {
*addrs = s_fileAddrsOverride;
return arrsize(s_fileAddrsOverride);
}
else {
*addrs = s_fileAddrs;
return arrsize(s_fileAddrs);
}
*addrs = s_fileAddrs;
return arrsize(s_fileAddrs);
}
//============================================================================
void SetFileSrvHostname (const wchar addr[]) {
StrCopy(s_fileAddrCmdLine, addr, arrsize(s_fileAddrCmdLine));
StrCopy(s_fileAddrConsole, addr, arrsize(s_fileAddrConsole));
}
//============================================================================
bool FileSrvHostnameOverride () {
return s_fileAddrCmdLine[0];
return s_fileAddrConsole[0];
}
//============================================================================
@ -212,26 +120,14 @@ bool FileSrvHostnameOverride () {
//============================================================================
unsigned GetCsrSrvHostnames (const wchar *** addrs) {
if (s_csrAddrCmdLine[0]) {
*addrs = s_csrAddrsOverride;
return arrsize(s_csrAddrsOverride);
}
else {
*addrs = s_csrAddrs;
return arrsize(s_csrAddrs);
}
*addrs = s_csrAddrs;
return arrsize(s_csrAddrs);
}
//============================================================================
void SetCsrSrvHostname (const wchar addr[]) {
StrCopy(s_csrAddrCmdLine, addr, arrsize(s_csrAddrCmdLine));
}
//============================================================================
bool CsrSrvHostnameOverride () {
return s_csrAddrCmdLine[0];
StrCopy(s_csrAddrConsole, addr, arrsize(s_csrAddrConsole));
}
@ -240,24 +136,13 @@ bool CsrSrvHostnameOverride () {
//============================================================================
unsigned GetGateKeeperSrvHostnames (const wchar *** addrs) {
if (s_gateKeeperAddrCmdLine[0]) {
*addrs = s_gateKeeperAddrsOverride;
return arrsize(s_gateKeeperAddrsOverride);
}
else {
*addrs = s_gateKeeperAddrs;
return arrsize(s_gateKeeperAddrs);
}
*addrs = s_gateKeeperAddrs;
return arrsize(s_gateKeeperAddrs);
}
//============================================================================
void SetGateKeeperSrvHostname (const wchar addr[]) {
StrCopy(s_gateKeeperAddrCmdLine, addr, arrsize(s_gateKeeperAddrCmdLine));
}
//============================================================================
bool GateKeeperSrvHostnameOverride () {
return s_gateKeeperAddrCmdLine[0];
StrCopy(s_gateKeeperAddrConsole, addr, arrsize(s_gateKeeperAddrConsole));
}

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

@ -83,11 +83,9 @@ bool FileSrvHostnameOverride ();
unsigned GetCsrSrvHostnames (const wchar *** addrs); // returns addrCount
void SetCsrSrvHostname (const wchar addr[]);
bool CsrSrvHostnameOverride ();
unsigned GetGateKeeperSrvHostnames (const wchar *** addrs); // returns addrCount
void SetGateKeeperSrvHostname (const wchar addr[]);
bool GateKeeperSrvHostnameOverride ();
const wchar *GetServerStatusUrl ();
void SetServerStatusUrl (const wchar url[]);

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

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

Loading…
Cancel
Save