|
@@ -58,10 +58,10 @@ private:
|
|
|
class ResourceWatcherEntity : public CEntityBase, public IBroadcastListener, public ITimerListener, public ISysVarListener
|
|
|
{
|
|
|
public:
|
|
|
- ResourceWatcherEntity() :m_bInitMode(FALSE) {}
|
|
|
+ ResourceWatcherEntity():m_bInitMode(FALSE) {}
|
|
|
virtual ~ResourceWatcherEntity() {}
|
|
|
virtual const char* GetEntityName() const { return "ResourceWatcher"; }
|
|
|
- const char* GetEntityVersion() const { return MODULE_VERSION_FULL; }
|
|
|
+ const char* GetEntityVersion() const { return MODULE_VERSION_FULL; }
|
|
|
|
|
|
virtual CServerSessionBase* OnNewSession(const char*, const char*)
|
|
|
{
|
|
@@ -75,21 +75,21 @@ public:
|
|
|
DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("Version %s; Complied at: %s %s", MOD_VERSION, __DATE__, __TIME__);
|
|
|
|
|
|
ErrorCodeEnum errorCode = Error_Succeed;
|
|
|
- CSimpleStringA strtermState;
|
|
|
- GetFunction()->GetSysVar("TerminalStage", strtermState);
|
|
|
- if (strtermState.IsStartWith("Z=")) {
|
|
|
- DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("entity in config mode");
|
|
|
- m_bInitMode = TRUE;
|
|
|
- }
|
|
|
+ CSimpleStringA strtermState;
|
|
|
+ GetFunction()->GetSysVar("TerminalStage", strtermState);
|
|
|
+ if (strtermState.IsStartWith("Z=")) {
|
|
|
+ DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("entity in config mode");
|
|
|
+ m_bInitMode = TRUE;
|
|
|
+ }
|
|
|
|
|
|
errorCode = m_fsm.Init(this);
|
|
|
|
|
|
if (errorCode == Error_Succeed) {
|
|
|
|
|
|
- CSmartPointer<IEntityFunction> spEntityFunction = GetFunction();
|
|
|
- CSystemStaticInfo staticInfo;
|
|
|
- spEntityFunction->GetSystemStaticInfo(staticInfo);
|
|
|
-
|
|
|
+ CSmartPointer<IEntityFunction> spEntityFunction = GetFunction();
|
|
|
+ CSystemStaticInfo staticInfo;
|
|
|
+ spEntityFunction->GetSystemStaticInfo(staticInfo);
|
|
|
+
|
|
|
updateShowFlag = false;
|
|
|
newestSogouInstall = false;
|
|
|
lastUpgradeInstallTime = 0; //上次升级安装时间
|
|
@@ -98,7 +98,6 @@ public:
|
|
|
lastSogouChangeWarn = ""; //上一次搜狗告警信息
|
|
|
sogouProcessRun = 0; //搜狗进程是否启动
|
|
|
|
|
|
-
|
|
|
errorCode = spEntityFunction->SubscribeBroadcast("UpgradeManager", NULL, this, m_uuidUpgradeStateEventListener);
|
|
|
if (errorCode != Error_Succeed)
|
|
|
{
|
|
@@ -107,7 +106,7 @@ public:
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
pTransactionContext->SendAnswer(errorCode);
|
|
|
}
|
|
|
|