|
|
@@ -19,7 +19,18 @@ CServerSessionBase *CCenterSettingEntity::OnNewSession(const char* /*pszRemoteEn
|
|
|
return new CCenterSettingService(this);
|
|
|
}
|
|
|
|
|
|
- void CCenterSettingEntity::OnStarted()
|
|
|
+void CCenterSettingEntity::OnPreStart(CAutoArray<CSimpleStringA> strArgs, CSmartPointer<ITransactionContext> pTransactionContext)
|
|
|
+{
|
|
|
+ ErrorCodeEnum result(Error_Succeed);
|
|
|
+ CSimpleStringA strFilePath;
|
|
|
+ GetFunction()->GetPath("CenterSetting", strFilePath);
|
|
|
+ if (!ExistsFileA(strFilePath)) {
|
|
|
+ this->GetFunction()->ShowFatalError("集中配置文件不存在,请先下载集中配置再重启应用!");
|
|
|
+ }
|
|
|
+ pTransactionContext->SendAnswer(result);
|
|
|
+}
|
|
|
+
|
|
|
+void CCenterSettingEntity::OnStarted()
|
|
|
{
|
|
|
auto pFunc = GetFunction();
|
|
|
CSimpleStringA strPath;
|
|
|
@@ -39,12 +50,10 @@ CServerSessionBase *CCenterSettingEntity::OnNewSession(const char* /*pszRemoteEn
|
|
|
char szTmp[80];
|
|
|
inifile_read_str_s("Main", "SyncHash", "", szTmp, 80, pszFile);
|
|
|
info.strFileHash = szTmp;
|
|
|
-
|
|
|
inifile_read_str_s("Main", "SyncTime", "", szTmp, 80, pszFile);
|
|
|
DWORD nValue;
|
|
|
sscanf(szTmp, "0x%X", &nValue);
|
|
|
info.dwSyncTime = nValue;
|
|
|
-
|
|
|
m_SyncFileInfo[(const char*)strSite] = info;
|
|
|
}
|
|
|
}
|
|
|
@@ -55,6 +64,9 @@ CServerSessionBase *CCenterSettingEntity::OnNewSession(const char* /*pszRemoteEn
|
|
|
GetFunction()->GetPath("CenterSetting", strFilePath);
|
|
|
CSimpleStringA strNoUsed;
|
|
|
TryExtractSiteFromFileName(strFilePath, strNoUsed, m_strCurSiteExtName);
|
|
|
+ if (!ExistsFileA(strFilePath)) {
|
|
|
+ this->GetFunction()->ShowFatalError("集中配置文件不存在,请先下载集中配置后再重启运行!");
|
|
|
+ }
|
|
|
|
|
|
// 缓存当前RVCWeb版本
|
|
|
char szVersion[64] = {};
|