|
|
@@ -26,7 +26,7 @@ enum EntityOP
|
|
|
OP_CONTINUE_ENTITY,
|
|
|
};
|
|
|
|
|
|
-extern struct callback_entry : public IReleasable
|
|
|
+struct callback_entry : public IReleasable
|
|
|
{
|
|
|
virtual ~callback_entry() {}
|
|
|
|
|
|
@@ -176,6 +176,37 @@ unsigned int CVtmLoaderFSM::s0_on_event(FSMEvent* pEvt)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
+void CVtmLoaderFSM::ShowEntityBootFailedAtFront(LPCTSTR lpcszEntityName, ErrorCodeEnum bootFailedResult, bool isBlock)
|
|
|
+{
|
|
|
+#if defined(RVC_OS_LINUX)
|
|
|
+
|
|
|
+ CEntityLastErrorInfo errInfo = {};
|
|
|
+ ErrorCodeEnum errCode = GetEntityBase()->GetFunction()->GetEntityLastError(lpcszEntityName, errInfo);
|
|
|
+ CSimpleStringA strErrMsg(true);
|
|
|
+ if (!errInfo.strErrMsg.IsNullOrEmpty()) {
|
|
|
+ strErrMsg = CSimpleStringA::Format("%s:%s", lpcszEntityName, (LPCTSTR)errInfo.strErrMsg);
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ strErrMsg = CSimpleStringA::Format("%s模块初始化失败: %s", lpcszEntityName, (LPCTSTR)SpStrError(bootFailedResult));
|
|
|
+ }
|
|
|
+
|
|
|
+ if (CSimpleStringA(lpcszEntityName).Compare("SIPPhone", true) == 0)
|
|
|
+ {
|
|
|
+ GetEntityBase()->GetFunction()->SetSysVar("AuthErrMsg", strErrMsg.GetData());//实体启动失败保存到错误页字段
|
|
|
+ }
|
|
|
+
|
|
|
+ if (isBlock) {
|
|
|
+ SP::Module::Comm::LogErrorNotiyStruct notifyItem(bootFailedResult, 0);
|
|
|
+ SP::Module::Comm::LogNotiyMessageStruct notifyMsg(strErrMsg);
|
|
|
+ notifyItem.Notify(notifyMsg);
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ LogError(Severity_High, bootFailedResult, 0, strErrMsg);
|
|
|
+ }
|
|
|
+
|
|
|
+#endif //RVC_OS_LINUX
|
|
|
+}
|
|
|
+
|
|
|
//CoreBoot
|
|
|
void CVtmLoaderFSM::s1_on_entry()
|
|
|
{
|