|
@@ -604,9 +604,11 @@ struct GetTokenTask : ITaskSp
|
|
|
SP::Module::Restful::CommResponseJson responseStatus;
|
|
|
SP::Module::Restful::GetStatusFromDebranchResponse(result.content, responseStatus);
|
|
|
if (!responseStatus.IsOperatedOK()) {
|
|
|
- m_fsm->doWarnMsg(ERR_ACCESSAUTH_LOCK_STATE,
|
|
|
+ /*m_fsm->doWarnMsg(ERR_ACCESSAUTH_LOCK_STATE,
|
|
|
GetOutPutStr("%s%s%s%s", "GetTokenTask", responseStatus.errorCode.c_str(),
|
|
|
- "message", responseStatus.errorMsg.c_str()).c_str(), true);
|
|
|
+ "message", responseStatus.errorMsg.c_str()).c_str(), true);*/
|
|
|
+
|
|
|
+ m_fsm->AuthLogWarn(result, config.GetRequestUri(), "获取准入token");
|
|
|
return;
|
|
|
}
|
|
|
SP::Module::Restful::ExtractDataFromDebranchResponse(result.content, getTokenAns);
|
|
@@ -644,8 +646,10 @@ struct GetTokenTask : ITaskSp
|
|
|
LogWarn(Severity_Low, Error_Debug, ERROR_ACCESSAUTH_ACS_DIGINFO, errDetail.c_str());
|
|
|
}
|
|
|
}
|
|
|
- m_fsm->doWarnMsg(ERROR_ACCESSAUTH_CONNECT_ACS,
|
|
|
- GetOutPutStr("%s%s", "连接总行ACS准入服务失败(GetTokenTask).", result.WhatError().c_str()).c_str(), true);
|
|
|
+ /*m_fsm->doWarnMsg(ERROR_ACCESSAUTH_CONNECT_ACS,
|
|
|
+ GetOutPutStr("%s%s", "连接总行ACS准入服务失败(GetTokenTask).", result.WhatError().c_str()).c_str(), true);*/
|
|
|
+
|
|
|
+ m_fsm->AuthLogWarn(result, config.GetRequestUri(), "获取准入token");
|
|
|
DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("GetTokenTask Connect Failed.");
|
|
|
}
|
|
|
FSMEvent* pEvent = new FSMEvent(CAccessAuthFSM::Event_ReqTokenFail);
|
|
@@ -1691,20 +1695,31 @@ void CAccessAuthFSM::AuthLogWarn(const T& ret, const string& url, const string&
|
|
|
|
|
|
void CAccessAuthFSM::GetNetMsg(SpReqAnsContext<AccessAuthService_GetNetMsg_Req, AccessAuthService_GetNetMsg_Ans>::Pointer& ctx)
|
|
|
{
|
|
|
- //CSimpleStringA tmp;
|
|
|
- //ErrorCodeEnum errCode = GetDNS(tmp);
|
|
|
-
|
|
|
- //Dbg("网卡状态:%d, 网卡信息为:%s.", errCode, tmp.GetData());
|
|
|
- //ctx->Ans.netMsg = tmp;
|
|
|
- //if (errCode == Error_Succeed)
|
|
|
- //{
|
|
|
- // ctx->Ans.netStatus = 1; //成功
|
|
|
- //}
|
|
|
- //else
|
|
|
- //{
|
|
|
- // ctx->Ans.netStatus = 0; //失败
|
|
|
- //}
|
|
|
-
|
|
|
+ CSimpleStringA tmp;
|
|
|
+#ifdef RVC_OS_WIN
|
|
|
+ ErrorCodeEnum errCode = GetDNS(tmp);
|
|
|
+ Dbg("网卡状态:%d, 网卡信息为:%s.", errCode, tmp.GetData());
|
|
|
+ ctx->Ans.netMsg = tmp;
|
|
|
+ if (errCode == Error_Succeed)
|
|
|
+ {
|
|
|
+ ctx->Ans.netStatus = 1; //成功
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ ctx->Ans.netStatus = 0; //失败
|
|
|
+ }
|
|
|
+#else
|
|
|
+ if (DetectNetworkLegality(tmp))
|
|
|
+ {
|
|
|
+ ctx->Ans.netStatus = 1; //成功
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ ctx->Ans.netStatus = 0; //失败
|
|
|
+ }
|
|
|
+ Dbg("网络信息:%s.", tmp.GetData());
|
|
|
+ ctx->Ans.netMsg = tmp;
|
|
|
+#endif // RVC_OS_WIN
|
|
|
ctx->Answer(Error_Succeed);
|
|
|
}
|
|
|
|