platform/shared/common/RhodesApp.cpp in rhodes-3.2.2 vs platform/shared/common/RhodesApp.cpp in rhodes-3.2.3
- old
+ new
@@ -63,10 +63,11 @@
namespace rho {
namespace common{
IMPLEMENT_LOGCLASS(CRhodesApp,"RhodesApp");
String CRhodesApp::m_strStartParameters;
+boolean CRhodesApp::m_bSecurityTokenNotPassed = false;
class CAppCallbacksQueue : public CThreadQueue
{
DEFINE_LOGCLASS;
public:
@@ -1570,10 +1571,12 @@
String strCmdLine = szCmdLine ? szCmdLine : "";
CRhodesApp::setStartParameters(szCmdLine);
RAWLOGC_INFO1("RhodesApp", "New start params: %s", strCmdLine.c_str());
+ CRhodesApp::setSecurityTokenNotPassed(false);
+
const char* szAppSecToken = get_app_build_config_item("security_token");
if ( !szAppSecToken || !*szAppSecToken)
return 1;
int skpos = strCmdLine.find(security_key);
@@ -1585,10 +1588,12 @@
if ((String::size_type)divider != String::npos)
strCmdLineSecToken = tmp.substr(0, divider);
else
strCmdLineSecToken = tmp;
}
+ int result = strCmdLineSecToken.compare(szAppSecToken) != 0 ? 0 : 1;
+ CRhodesApp::setSecurityTokenNotPassed(!result);
- return strCmdLineSecToken.compare(szAppSecToken) != 0 ? 0 : 1;
+ return result;
}
} //extern "C"