|
@@ -2,7 +2,7 @@
|
|
|
#include "SpBase.h"
|
|
|
#include "Event.h"
|
|
|
#include "mod_centersetting.h"
|
|
|
-
|
|
|
+#include "publicFunExport.h"
|
|
|
#include "fileutil.h"
|
|
|
#include "iniutil.h"
|
|
|
#include "array.h"
|
|
@@ -25,7 +25,14 @@ void CCenterSettingEntity::OnPreStart(CAutoArray<CSimpleStringA> strArgs, CSmart
|
|
|
CSimpleStringA strFilePath;
|
|
|
GetFunction()->GetPath("CenterSetting", strFilePath);
|
|
|
if (!ExistsFileA(strFilePath)) {
|
|
|
- this->GetFunction()->ShowFatalError("集中配置文件不存在,请先下载集中配置再重启应用!");
|
|
|
+ std::map<std::string, std::string> srcData;
|
|
|
+ srcData.insert(std::make_pair("reason", "empty"));
|
|
|
+ srcData.insert(std::make_pair("errmsg", "集中配置文件不存在,请先下载集中配置再重启应用!"));
|
|
|
+ srcData.insert(std::make_pair("rebootTime", "0"));
|
|
|
+ auto ret = generateJsonStr(srcData);
|
|
|
+ if (ret.first) {
|
|
|
+ LogNotify(Notify_Error, Error_InvalidState, 0, ret.second.c_str());
|
|
|
+ }
|
|
|
}
|
|
|
pTransactionContext->SendAnswer(result);
|
|
|
}
|
|
@@ -64,9 +71,6 @@ void CCenterSettingEntity::OnStarted()
|
|
|
GetFunction()->GetPath("CenterSetting", strFilePath);
|
|
|
CSimpleStringA strNoUsed;
|
|
|
TryExtractSiteFromFileName(strFilePath, strNoUsed, m_strCurSiteExtName);
|
|
|
- if (!ExistsFileA(strFilePath)) {
|
|
|
- this->GetFunction()->ShowFatalError("集中配置文件不存在,请先下载集中配置后再重启运行!");
|
|
|
- }
|
|
|
|
|
|
// 缓存当前RVCWeb版本
|
|
|
char szVersion[64] = {};
|