|
|
@@ -122,10 +122,14 @@ namespace Chromium {
|
|
|
GetFunction()->GetSystemStaticInfo(m_sysInfo);
|
|
|
|
|
|
ErrorCodeEnum Error;
|
|
|
- Error = GetFunction()->StartTcpBridgeServer(m_iTcpBridgePort);
|
|
|
+ if (Error_Succeed != (Error = GetFunction()->StartTcpBridgeServer(m_iTcpBridgePort)))
|
|
|
+ {
|
|
|
+ LOG_TRACE("start tcp bridge server failed!");
|
|
|
+ pTransactionContext->SendAnswer(Error);
|
|
|
+ return;
|
|
|
+ }
|
|
|
#if (defined _WIN32 || defined _WIN64)
|
|
|
- Error = GetFunction()->SubscribeBroadcast("IEBrowser", "CustomerCmd", this, m_uidBrowserListenser);
|
|
|
- if (Error != Error_Succeed) {
|
|
|
+ if (Error_Succeed != (Error = GetFunction()->SubscribeBroadcast("IEBrowser", "CustomerCmd", this, m_uidBrowserListenser))) {
|
|
|
LOG_TRACE("subscribe browser CustomerCmd failed!");
|
|
|
pTransactionContext->SendAnswer(Error);
|
|
|
}
|
|
|
@@ -133,12 +137,7 @@ namespace Chromium {
|
|
|
LOG_TRACE("subscribe browser CustomerCmd success!");
|
|
|
#endif
|
|
|
|
|
|
- if (Error != Error_Succeed)
|
|
|
- {
|
|
|
- LOG_TRACE("start tcp bridge server failed!");
|
|
|
- pTransactionContext->SendAnswer(Error);
|
|
|
- return;
|
|
|
- }
|
|
|
+
|
|
|
const int ArgsCount = strArgs.GetCount();
|
|
|
LOG_TRACE("strArgs.GetCount() = %d", ArgsCount);
|
|
|
for (int i = 0; i < ArgsCount; ++i) {
|
|
|
@@ -178,7 +177,10 @@ namespace Chromium {
|
|
|
LOG_TRACE("subscribe AccessAuthorization log failed!");
|
|
|
else
|
|
|
LOG_TRACE("subscribe AccessAuthorization success!");
|
|
|
- GetFunction()->SubscribeLog(m_uuidAccessAuthErr, this, Log_Error, Severity_None, Error_IgnoreAll, -1, "AccessAuthorization");
|
|
|
+ //GetFunction()->SubscribeLog(m_uuidAccessAuthErr, this, Log_Error, Severity_None, Error_IgnoreAll, -1, "AccessAuthorization");
|
|
|
+
|
|
|
+ if(Error_Succeed == GetFunction()->SubscribeLog(m_uuidAllFault, this, Log_Notify, Severity_High, Error_IgnoreAll, -2, NULL, false))
|
|
|
+ this->GetFunction()->GetPrivilegeFunction()->RefreshFrameworkState(FrameworkState_NotDisturb);
|
|
|
|
|
|
GetFunction()->RegistSysVarEvent("UIState", this);
|
|
|
|
|
|
@@ -255,7 +257,25 @@ namespace Chromium {
|
|
|
const DWORD dwSysError, const DWORD dwUserCode, const DWORD dwEntityInstanceID, const WORD wEntityDevelID,
|
|
|
const CAutoArray<DWORD>& Param, const char* pszEntityName, const char* pszModuleName, const char* pszMessage)
|
|
|
{
|
|
|
- Dbg("OnLog %x", dwUserCode);
|
|
|
+ Dbg("OnLog %x from entity %s, msg : %s", dwUserCode, NULL == pszEntityName ? "" : pszEntityName, NULL == pszMessage ? "" : pszMessage);
|
|
|
+ if (Log_Notify == eLogType)
|
|
|
+ {
|
|
|
+ try {
|
|
|
+ cJSON* pJson = cJSON_Parse(pszMessage);
|
|
|
+ auto notifyReason = cJSON_GetObjectItem(pJson, "reason")->valuestring;
|
|
|
+ auto notifymsg = cJSON_GetObjectItem(pJson, "errmsg")->valuestring;
|
|
|
+ auto notiryRebootTime = cJSON_GetObjectItem(pJson, "rebootTime")->valuestring;
|
|
|
+ auto openRet = CModTools::get_mutable_instance().StartChromiumBrowser(ERR_PAGE_REASON::ErrNotify, notifyReason, notifymsg, notiryRebootTime);
|
|
|
+ Dbg("Log_Notify err, open page, %d", openRet.first);
|
|
|
+ }
|
|
|
+ catch(std::exception &e){
|
|
|
+ Dbg("Log_Notify err, %s", e.what());
|
|
|
+ }
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
switch (dwUserCode)
|
|
|
{
|
|
|
case LOG_EVT_BEGIN_CAMERA_CONFIG://no use
|