Changed: Init CLoginProgressPostThread only if InstallStatsUrl is defined
--HG-- branch : develop
This commit is contained in:
parent
49ef5a1ed7
commit
6ec0ab01cf
1 changed files with 10 additions and 11 deletions
|
@ -345,21 +345,20 @@ void CLoginProgressPostThread::init(NLMISC::CConfigFile &configFile)
|
||||||
static std::string::size_type httpStrSize = httpStr.size();
|
static std::string::size_type httpStrSize = httpStr.size();
|
||||||
std::string tmp = configFile.getVarPtr("InstallStatsUrl")->asString(0);
|
std::string tmp = configFile.getVarPtr("InstallStatsUrl")->asString(0);
|
||||||
std::string::size_type it= tmp.find(httpStr);
|
std::string::size_type it= tmp.find(httpStr);
|
||||||
if (it != std::string::npos)
|
if (it == std::string::npos) return;
|
||||||
{
|
|
||||||
std::string::size_type hostPageSeparator = tmp.find("/", httpStrSize);
|
std::string::size_type hostPageSeparator = tmp.find("/", httpStrSize);
|
||||||
if (hostPageSeparator != std::string::npos)
|
if (hostPageSeparator == std::string::npos) return;
|
||||||
{
|
|
||||||
installStartupPage = tmp.substr(hostPageSeparator); //keep the leading slash
|
installStartupPage = tmp.substr(hostPageSeparator); //keep the leading slash
|
||||||
installStartupHost = tmp.substr(httpStrSize, hostPageSeparator - httpStrSize); // dont keep the last slah
|
installStartupHost = tmp.substr(httpStrSize, hostPageSeparator - httpStrSize); // dont keep the last slah
|
||||||
}
|
|
||||||
}
|
init(installStartupHost, installStartupPage);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
nlwarning("Error the InstallStatsUrl is not in the client_default.cfg.");
|
// nlwarning("Error the InstallStatsUrl is not in the client_default.cfg.");
|
||||||
}
|
}
|
||||||
init(installStartupHost, installStartupPage);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue