Skip to content

Commit

Permalink
Remove Locator reliance on obsolete .ini fields
Browse files Browse the repository at this point in the history
  • Loading branch information
Asunaya committed Aug 5, 2016
1 parent db85180 commit 6e0976c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Locator/MLocator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,9 +265,9 @@ bool MLocator::InitCountryCodeFilter()

void MLocator::Destroy()
{
// MCommandCommunicator::Destroy();

#ifdef LOCATOR_FREESTANDING
ReleaseDBMgr();
#endif
ReleaseSafeUDP();
ReleaseUDPManager();
ReleaseValidCountryCodeList();
Expand Down
4 changes: 2 additions & 2 deletions Locator/MLocator.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ private :
DWORD m_nSendCount;
DWORD m_nDuplicatedCount;

MLocatorDBMgr* m_pDBMgr;
MCountryFilter* m_pCountryFilter;
MLocatorDBMgr* m_pDBMgr = nullptr;
MCountryFilter* m_pCountryFilter = nullptr;

void* m_vpServerStatusInfoBlob;
int m_nLastGetServerStatusCount;
Expand Down
4 changes: 4 additions & 0 deletions Locator/MLocatorConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ MLocatorConfig::~MLocatorConfig(void)

bool MLocatorConfig::LoadConfig()
{
#ifdef LOCATOR_FREESTANDING
if( !LoadDBConfig() ) return false;
#endif
if( !LoadNetConfig() ) return false;
if( !LoadEnvConfig() ) return false;

Expand Down Expand Up @@ -55,9 +57,11 @@ bool MLocatorConfig::LoadNetConfig()
{
char szVal[ 256 ];

#ifdef LOCATOR_FREESTANDING
GetPrivateProfileString( "NETWORK", "IP", "", szVal, 255, LOCATOR_CONFIG );
if( 0 == strlen(szVal) ) return false;
SetLocatorIP( szVal );
#endif

GetPrivateProfileString( "NETWORK", "PORT", "", szVal, 255, LOCATOR_CONFIG );
if( 0 == strlen(szVal) ) return false;
Expand Down

0 comments on commit 6e0976c

Please sign in to comment.