Sfoglia il codice sorgente

#IQRV #comment 北斗链路3

陈良瑜80374463 2 anni fa
parent
commit
5f51b17e24

+ 1 - 1
Module/mod_CameraConfigManage/mod_CameraConfigManage.cpp

@@ -365,7 +365,7 @@ ErrorCodeEnum CCameraConfigManageEntity::GetHSPCameras(
 
 		ScannerService_GetOnlineCameras_Ans ans = {};
 
-		rc = pScannerSetClient->GetOnlineCameras(req, ans, 10000);
+		rc = (*pScannerSetClient)(EntityResource::getLink().upgradeLink())->GetOnlineCameras(req, ans, 10000);
 		if (rc != Error_Succeed)
 		{
 			Dbg("ScannerSet 调用 GetOnlineCameras 失败: 0x%x", rc);

+ 5 - 5
Module/mod_RomoteController/RemoteControllerCnn.cpp

@@ -1028,7 +1028,7 @@ ErrorCodeEnum CRemoteControllerCnn::HandleUploadEventLogReq(const CSmartPointer<
 			Dbg("evtName:%d, evtLevel:%d, duration:%d, startTime:%d, endTime:%d, cusEvtFileName:%s,evtSrcEventName:%s, reversed1:%d, reversed2:%s, startPos:%d, MaxRet:%d, UploadFile:%s", 
 				req.evtName, req.evtLevel, req.duration, req.startTime, req.endTime,
 				req.cusEvtFileName, req.evtSrcEventName, req.reversed1, req.reversed2, req.StartPos, req.MaxRetBytes, req.UploadFile);
-			rc = pClient->ExtractEventLog(rvcReq, rvcAns, 60000 * 5);
+			rc = (*pClient)(EntityResource::getLink().upgradeLink())->ExtractEventLog(rvcReq, rvcAns, 60000 * 5);
 			Dbg("entries:%d, information:%s, evtLogFileName:%s", rvcAns.entries, rvcAns.information.GetData(), rvcAns.evtLogFileName.GetData());
 			pClient->GetFunction()->CloseSession();
 
@@ -1303,7 +1303,7 @@ ErrorCodeEnum CRemoteControllerCnn::HandleOperateDiskReq(const CSmartPointer<IPa
 	auto rc = pClient->Connect();
 	if (rc == Error_Succeed)
 	{
-		rc = pClient->OperateFile(rvcReq, rvcAns, 60000);
+		rc = (*pClient)(EntityResource::getLink().upgradeLink())->OperateFile(rvcReq, rvcAns, 60000);
 		pClient->GetFunction()->CloseSession();
 		
 	}
@@ -1592,7 +1592,7 @@ ErrorCodeEnum CRemoteControllerCnn::HandleUpgradePackReq(const CSmartPointer<IPa
 		req.strPackFile = strPack;
 
 		UpgradeMgrService_RegistLocalPack_Ans ans = {};
-		rc = pClient->RegistLocalPack(req, ans, 10000);
+		rc = (*pClient)(EntityResource::getLink().upgradeLink())->RegistLocalPack(req, ans, 10000);
 
 		pClient->GetFunction()->CloseSession();
     } else {
@@ -1651,7 +1651,7 @@ ErrorCodeEnum CRemoteControllerCnn::HandleRollbackUpgradeReq(const CSmartPointer
 	{
 		UpgradeMgrService_RollbackUpdate_Req req = {};		
 		UpgradeMgrService_RollbackUpdate_Ans ans = {};
-		rc = pClient->RollbackUpdate(req, ans, 10000);
+		rc = (*pClient)(EntityResource::getLink().upgradeLink())->RollbackUpdate(req, ans, 10000);
 
 		pClient->GetFunction()->CloseSession();
     } else {
@@ -3381,7 +3381,7 @@ ErrorCodeEnum CRemoteControllerCnn::HandleCancelUpgradeReq(const CSmartPointer<I
 		req.strPackFile = strPack;
 
 		UpgradeMgrService_CancelUpdate_Ans ans = {};
-		rc = pClient->CancelUpdate(req, ans, 10000);
+		rc = (*pClient)(EntityResource::getLink().upgradeLink())->CancelUpdate(req, ans, 10000);
 
 		pClient->GetFunction()->CloseSession();
     } else {

+ 14 - 14
Module/mod_ScannerSet/ScannerSetFSM.cpp

@@ -691,7 +691,7 @@ int CScannerFSM::StartPreview(SpReqAnsContext<ScannerService_StartPreview_Req,
 		req.scanType = ctx->Req.scanType;
 		req.colorType = ctx->Req.colorType;
 
-		erroCode = m_pPortableClient->StartPreview(req, ans, MILLISECOND_WAIT_TIMEOUT_STARTPREVIEW, dwUserCode);
+		erroCode = (*m_pPortableClient)(EntityResource::getLink().upgradeLink())->StartPreview(req, ans, MILLISECOND_WAIT_TIMEOUT_STARTPREVIEW, dwUserCode);
 		if(FAILURED(erroCode)) {
 			LogWarn(Severity_Middle, erroCode, LOG_ERR_SCANNERSET_API_INVOKE_StartPreview,
 				CSimpleStringA::Format("StartPreview context failed, retCode: %s(%d).", SpStrError(erroCode), dwUserCode));
@@ -739,7 +739,7 @@ int CScannerFSM::StopPreview(SpReqAnsContext<ScannerService_CancelPreview_Req,
 		PortableScannerService_CancelPreview_Ans ans = {};
 
 		req.bOnlyHide = ctx->Req.reserved1 == 0 ? false : true;
-		erroCode = m_pPortableClient->CancelPreview(req, ans, MILLISECOND_WAIT_TIMEOUT_DEFAULT, dwUserCode);
+		erroCode = (*m_pPortableClient)(EntityResource::getLink().upgradeLink())->CancelPreview(req, ans, MILLISECOND_WAIT_TIMEOUT_DEFAULT, dwUserCode);
 		ctx->Answer(erroCode, dwUserCode);
 
 		if(FAILURED(erroCode)) {
@@ -790,7 +790,7 @@ int CScannerFSM::ScanImage(SpReqAnsContext<ScannerService_ScanImage_Req,
 			PortableScannerService_ScanImage_Req req = {};
 			PortableScannerService_ScanImage_Ans ans = {};
 
-			erroCode = m_pPortableClient->ScanImage(req, ans, MILLISECOND_WAIT_TIMEOUT_SCANIMAGE, dwUserCode);
+			erroCode = (*m_pPortableClient)(EntityResource::getLink().upgradeLink())->ScanImage(req, ans, MILLISECOND_WAIT_TIMEOUT_SCANIMAGE, dwUserCode);
 
 			if(FAILURED(erroCode)) {
 				if (MapErrorCode2Level(erroCode)) {
@@ -834,7 +834,7 @@ int CScannerFSM::ScanImage(SpReqAnsContext<ScannerService_ScanImage_Req,
 			PortableScannerService_ScanImageEx_Req req = {};
 			PortableScannerService_ScanImageEx_Ans ans = {};
 
-			erroCode = m_pPortableClient->ScanImageEx(req, ans, MILLISECOND_WAIT_TIMEOUT_SCANIMAGE, dwUserCode);
+			erroCode = (*m_pPortableClient)(EntityResource::getLink().upgradeLink())->ScanImageEx(req, ans, MILLISECOND_WAIT_TIMEOUT_SCANIMAGE, dwUserCode);
 			if(FAILURED(erroCode)) {
 				if (MapErrorCode2Level(erroCode)) {
 					LogWarn(Severity_Middle, erroCode, LOG_ERR_SCANNERSET_API_INVOKE_ScanImageEx,
@@ -894,7 +894,7 @@ int CScannerFSM::SetProperty(SpReqAnsContext<ScannerService_SetProperty_Req,
 		req.scanType = ctx->Req.scanType;
 		req.colorType = ctx->Req.colorType;
 
-		erroCode = m_pPortableClient->SetProperty(req, ans, MILLISECOND_WAIT_TIMEOUT_DEFAULT, dwUserCode);
+		erroCode = (*m_pPortableClient)(EntityResource::getLink().upgradeLink())->SetProperty(req, ans, MILLISECOND_WAIT_TIMEOUT_DEFAULT, dwUserCode);
 		if(FAILURED(erroCode)) {
 			LogWarn(Severity_Middle, erroCode, LOG_ERR_SCANNERSET_API_INVOKE_SetProperty,
 				CSimpleStringA::Format("SetProperty context error, retCode: ans(%d), ctx(%d).", erroCode, dwUserCode));
@@ -930,7 +930,7 @@ int CScannerFSM::ShowLTProperty(SpReqAnsContext<ScannerService_ShowProperty_Req,
 	} else if(m_bUsePortableScanner) {
 		PortableScannerService_ShowProperty_Req req = {};
 		PortableScannerService_ShowProperty_Ans ans = {};
-		erroCode = m_pPortableClient->ShowProperty(req, ans, MILLISECOND_WAIT_TIMEOUT_DEFAULT, dwUserCode);
+		erroCode = (*m_pPortableClient)(EntityResource::getLink().upgradeLink())->ShowProperty(req, ans, MILLISECOND_WAIT_TIMEOUT_DEFAULT, dwUserCode);
 	}
 	if(FAILURED(erroCode)) 
 	{
@@ -981,7 +981,7 @@ int CScannerFSM::SetWinPos(SpReqAnsContext<ScannerService_SetWindowPos_Req,
 		req.pointY = ctx->Req.pointY;
 		req.nWidth = ctx->Req.nWidth;
 
-		erroCode = m_pPortableClient->SetWinPos(req, ans, MILLISECOND_WAIT_TIMEOUT_DEFAULT, dwUserCode);
+		erroCode = (*m_pPortableClient)(EntityResource::getLink().upgradeLink())->SetWinPos(req, ans, MILLISECOND_WAIT_TIMEOUT_DEFAULT, dwUserCode);
 	}
 
 	if(FAILURED(erroCode)) {
@@ -1031,7 +1031,7 @@ int CScannerFSM::GetDevStatus(SpReqAnsContext<ScannerService_GetDevStatus_Req,
 		PortableScannerService_GetDevStatus_Req req = {};
 		PortableScannerService_GetDevStatus_Ans ans = {};
 
-		erroCode = m_pPortableClient->GetDevStatus(req, ans, MILLISECOND_WAIT_TIMEOUT_DEFAULT, dwUserCode);
+		erroCode = (*m_pPortableClient)(EntityResource::getLink().upgradeLink())->GetDevStatus(req, ans, MILLISECOND_WAIT_TIMEOUT_DEFAULT, dwUserCode);
 		if(FAILURED(erroCode)) {
 			LogWarn(Severity_Middle, erroCode, LOG_ERR_SCANNERSET_API_INVOKE_GetDevStatus,
 				CSimpleStringA::Format("GetDevStatus context suc, retCode: ans(%d), ctx(%d).", erroCode, dwUserCode));
@@ -1088,7 +1088,7 @@ int CScannerFSM::GetDevInfo(SpReqAnsContext<ScannerService_GetDevInfo_Req,
 
 		PortableScannerService_GetDevInfo_Req req = {};
 		PortableScannerService_GetDevInfo_Ans ans = {};
-		erroCode = m_pPortableClient->GetDevInfo(req, ans, MILLISECOND_WAIT_TIMEOUT_DEFAULT, dwUserCode);
+		erroCode = (*m_pPortableClient)(EntityResource::getLink().upgradeLink())->GetDevInfo(req, ans, MILLISECOND_WAIT_TIMEOUT_DEFAULT, dwUserCode);
 		if(FAILURED(erroCode)) {
 			LogWarn(Severity_Middle, erroCode, LOG_ERR_SCANNERSET_API_INVOKE_GetDevInfo,
 				CSimpleStringA::Format("GetDevInfo context suc, retCode: ans(%d), ctx(%d).", erroCode, dwUserCode));
@@ -1148,7 +1148,7 @@ ErrorCodeEnum CScannerFSM::OnDevExit()
 		erroCode = (*m_pHSPSClient)(EntityResource::getLink().upgradeLink())->Exit();
 	}else if(m_bUsePortableScanner) {
 		PortableScannerService_Exit_Info info = {};
-		erroCode = m_pPortableClient->Exit();
+		erroCode = (*m_pPortableClient)(EntityResource::getLink().upgradeLink())->Exit();
 		if(erroCode == Error_Succeed && IsPortScanHoldEnvCameraFromSysVar()) {
 			WaitPortableReleaseCamera(CAMTYPE_ENV);
 			AccessCamerePriviledge(false, CAMTYPE_ENV);
@@ -1669,7 +1669,7 @@ ErrorCodeEnum CScannerFSM::IsPortScanHoldDevice(ScannerDeviceInfo* pInfo, int& c
 	if(IsSuitableEntityAvailable()) {
 		PortableScannerService_GetDevStatus_Req req = {};
 		PortableScannerService_GetDevStatus_Ans ans = {};
-		auto ec = m_pPortableClient->GetDevStatus(req, ans, MILLISECOND_WAIT_TIMEOUT_DEFAULT);
+		auto ec = (*m_pPortableClient)(EntityResource::getLink().upgradeLink())->GetDevStatus(req, ans, MILLISECOND_WAIT_TIMEOUT_DEFAULT);
 		if(FAILURED(ec)) {
 			if (MapErrorCode2Level(ec)) {
 				LogWarn(Severity_Middle, ec, LOG_ERR_SCANNERSET_API_INVOKE_GetDevStatus,
@@ -1715,7 +1715,7 @@ ErrorCodeEnum CScannerFSM::IsPortScanHoldDevice(bool& hasHolden,
 	if(IsSuitableEntityAvailable()) {
 		PortableScannerService_GetDevStatus_Req req = {};
 		PortableScannerService_GetDevStatus_Ans ans = {};
-		auto ec = m_pPortableClient->GetDevStatus(req, ans, MILLISECOND_WAIT_TIMEOUT_DEFAULT);
+		auto ec = (*m_pPortableClient)(EntityResource::getLink().upgradeLink())->GetDevStatus(req, ans, MILLISECOND_WAIT_TIMEOUT_DEFAULT);
 		if(FAILURED(ec)) {
 			LogWarn(Severity_Middle, ec, LOG_ERR_SCANNERSET_API_INVOKE_GetDevStatus,
 				CSimpleStringA::Format("GetDevStatus failed 0x%x(%d).", ec, ec));
@@ -1860,7 +1860,7 @@ ErrorCodeEnum CScannerFSM::_BindPSDevice(int nDevID, LPCTSTR lpcszDevName,  bool
 			}
 		}
 		DWORD dwUserCode(0);
-		rc = m_pPortableClient->BindCameraDevice(req, ans, MILLISECOND_WAIT_TIMEOUT_DEFAULT, dwUserCode);
+		rc = (*m_pPortableClient)(EntityResource::getLink().upgradeLink())->BindCameraDevice(req, ans, MILLISECOND_WAIT_TIMEOUT_DEFAULT, dwUserCode);
 		if(ISSUCCEEDED(rc)) {
 			LogWarn(Severity_Low, rc, LOG_ERR_SCANNERSET_BIND_CAMERA,
 				CSimpleStringA::Format("Bind portable scan device (%d)[%s] suc, previous one: [%d](%s)",
@@ -1973,7 +1973,7 @@ ErrorCodeEnum CScannerFSM::DropOffPortScannerDevice(bool skipToCheck)
 			IsPortScanHoldDevice(&preDev, state);
 		}
 
-		rc = m_pPortableClient->DropOffDevice();
+		rc = (*m_pPortableClient)(EntityResource::getLink().upgradeLink())->DropOffDevice();
 		if(rc == Error_Succeed) {
 			if(preDev.devType == CAMTYPE_ENV) { //not skip to check!!!!
 				WaitPortableReleaseCamera(CAMTYPE_ENV);

+ 3 - 3
Module/mod_accessauth/mod_AccessAuth.cpp

@@ -394,7 +394,7 @@ DWORD CAccessAuthEntity::SaveSM2KeyPair(const CBlob &pubKey, const CBlob &priKey
 		req.pub_key = pubKey;
 		req.pri_key = priKey;
 		TokenService_SetKeyPair_Ans ans;
-		rc = pTokenServiceClient->SetKeyPair(req, ans, 3000);
+		rc = (*pTokenServiceClient)(EntityResource::getLink().upgradeLink())->SetKeyPair(req, ans, 3000);
 		pTokenServiceClient->GetFunction()->CloseSession();
 		if (rc != Error_Succeed)
 		{
@@ -438,7 +438,7 @@ ErrorCodeEnum CAccessAuthEntity::SaveTokenAndSharedSK(const CBlob &token, const
 		TokenService_SetToken_Req req = {};
 		req.token = token;
 		TokenService_SetToken_Ans ans;
-		rc = pTokenServiceClient->SetToken(req, ans, 5000);
+		rc = (*pTokenServiceClient)(EntityResource::getLink().upgradeLink())->SetToken(req, ans, 5000);
 		if (rc == Error_Succeed)
 			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM).setAPI("SetToken")
 				("save token succ, token: [%s]", ByteArrayToHexStr((BYTE*)token.m_pData, token.m_iLength).c_str());
@@ -456,7 +456,7 @@ ErrorCodeEnum CAccessAuthEntity::SaveTokenAndSharedSK(const CBlob &token, const
 		TokenService_SetSharedSK_Req req2 = {};
 		req2.ssk = sharedSK;
 		TokenService_SetSharedSK_Ans ans2 = {};
-		rc = pTokenServiceClient->SetSharedSK(req2, ans2, 5000);
+		rc = (*pTokenServiceClient)(EntityResource::getLink().upgradeLink())->SetSharedSK(req2, ans2, 5000);
 		if (rc == Error_Succeed)
 			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM).setAPI("SetSharedSK")
 				("save shared session key succ");

+ 1 - 1
Module/mod_chromium/CModTools.cpp

@@ -994,7 +994,7 @@ namespace Chromium {
 			UploadService_UploadDateList_Req req = {};
 			UploadService_UploadDateList_Ans ans = {};
 
-			rc = pClient->UploadDateList(req, ans, 10000);
+			rc = (*pClient)(EntityResource::getLink().upgradeLink())->UploadDateList(req, ans, 10000);
 
 			if (rc != Error_Succeed)
 				DbgEx("get CreateProcessRunAs fail from FreeRDPWrap: %d", rc);

+ 1 - 1
Module/mod_counterconnector/ConnectorFSM.cpp

@@ -280,7 +280,7 @@ BOOL ACMCallFSM::ReConnectionSipphone()
 		if (Error == Error_Succeed)
 		{
 			PhoneService_BeginState_Sub PhoneSub;
-			Error = m_pPhoneClient->BeginState(PhoneSub);
+			Error = (*m_pPhoneClient)(EntityResource::getLink().upgradeLink())->BeginState(PhoneSub);
 			if (Error != Error_Succeed) {
 				DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("BeginState sip failed!");
 				m_pPhoneClient->GetFunction()->CloseSession();

+ 12 - 12
Module/mod_counterconnector/ConnectorFSM.h

@@ -422,7 +422,7 @@ public:
 			Info.remote_view_x, Info.remote_view_y, Info.remote_view_cx, Info.remote_view_cy, Info.remote_fps);
 
 		if (Error == Error_Succeed) {
-			Error = m_pPhoneClient->StartVideo(Info);
+			Error = (*m_pPhoneClient)(EntityResource::getLink().upgradeLink())->StartVideo(Info);
 		} 
 		else {
 			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("parse video desc failed!");
@@ -435,7 +435,7 @@ public:
 		DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("Stop Video");
 		if (!m_pPhoneClient)
 			return Error_NetBroken;
-		return m_pPhoneClient->StopVideo();
+		return (*m_pPhoneClient)(EntityResource::getLink().upgradeLink())->StopVideo();
 	}
 
 	ErrorCodeEnum StartVideoRender(const char* param)
@@ -453,7 +453,7 @@ public:
 			Info.local_view_x, Info.local_view_y, Info.local_view_cx, Info.local_view_cy,
 			Info.remote_view_x, Info.remote_view_y, Info.remote_view_cx, Info.remote_view_cy);
 		if (Error == Error_Succeed) {
-			Error = m_pPhoneClient->StartVideoRender(Info);
+			Error = (*m_pPhoneClient)(EntityResource::getLink().upgradeLink())->StartVideoRender(Info);
 		}
 		else {
 			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("parse video desc failed!");
@@ -466,7 +466,7 @@ public:
 		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("Stop Record Video Render");
 		if (!m_pPhoneClient)
 			return Error_NetBroken;
-		return m_pPhoneClient->StopVideoRender();
+		return (*m_pPhoneClient)(EntityResource::getLink().upgradeLink())->StopVideoRender();
 	}
 
 	ErrorCodeEnum RealSipErrorCheck()
@@ -474,7 +474,7 @@ public:
 		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("Sip connect Fail 6 times,RealSipErrorCheck!");
 		if (!m_pPhoneClient)
 			return Error_NetBroken;
-		return m_pPhoneClient->RealErrorCheck();
+		return (*m_pPhoneClient)(EntityResource::getLink().upgradeLink())->RealErrorCheck();
 	}
 
 	ErrorCodeEnum SetCallingType(CallingTypeEnum eType)
@@ -486,7 +486,7 @@ public:
 
 		PhoneService_SetCallingParam_Info info;
 		info.CallType = eType;
-		return m_pPhoneClient->SetCallingParam(info);
+		return (*m_pPhoneClient)(EntityResource::getLink().upgradeLink())->SetCallingParam(info);
 	}
 
 	ErrorCodeEnum StopSpeakerAudioCapture()
@@ -596,10 +596,10 @@ private:
 		if (DOUBLERECORD_CALLTYPE == m_CallingParam.nCallType){
 			info.CallType = DOUBLERECORD_CALLTYPE;
 		}
-		m_pPhoneClient->SetCallingParam(info);
+		(*m_pPhoneClient)(EntityResource::getLink().upgradeLink())->SetCallingParam(info);
 
 		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("before make call, call type is %d, to_uri:%s", info.CallType, Req.to_uri.GetData());
-		ErrorCodeEnum Error = m_pPhoneClient->MakeCall(Req, Ans, 10000);
+		ErrorCodeEnum Error = (*m_pPhoneClient)(EntityResource::getLink().upgradeLink())->MakeCall(Req, Ans, 10000);
 		return Error;
 	}
 
@@ -622,10 +622,10 @@ private:
 		info.connect_session = callingparam.connect_session;
 		info.connect_ip = callingparam.connect_ip;
 		info.connect_port = callingparam.connect_port;
-		m_pPhoneClient->SetCallingParam(info);
+		(*m_pPhoneClient)(EntityResource::getLink().upgradeLink())->SetCallingParam(info);
 		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("before make call, call type is %d, to_uri:%s, from_uri:%s, call_id:%s", info.CallType, to_uri, from_uri, call_id);
 
-		ErrorCodeEnum Error = m_pPhoneClient->MakeCall(Req, Ans, 10000);
+		ErrorCodeEnum Error = (*m_pPhoneClient)(EntityResource::getLink().upgradeLink())->MakeCall(Req, Ans, 10000);
 
 		return Error;
 	}
@@ -653,7 +653,7 @@ private:
 			Req.branch_server_port = m_SessionParam.event_port;
 		}
 		
-		return m_pPhoneClient->HangupCall(Req, Ans, 10000);
+		return (*m_pPhoneClient)(EntityResource::getLink().upgradeLink())->HangupCall(Req, Ans, 10000);
 	}
 
 	ErrorCodeEnum ReleaseCall(int type)
@@ -663,7 +663,7 @@ private:
 		PhoneService_ReleaseCall_Req Req;
 		Req.type = type;
 		PhoneService_ReleaseCall_Ans Ans;
-		return m_pPhoneClient->ReleaseCall(Req, Ans, 10000);
+		return (*m_pPhoneClient)(EntityResource::getLink().upgradeLink())->ReleaseCall(Req, Ans, 10000);
 	}
 
 	ErrorCodeEnum StartChannel(int nChanServer)

+ 1 - 1
Module/mod_guiconsole/mainfrm.cpp

@@ -2141,7 +2141,7 @@ void CHighLevelView::OnManualUpgrade(UINT /*uNotifyCode*/, int /*nID*/, CWindow
 			UpgradeMgrService_RegistLocalPack_Req req = {};
 			UpgradeMgrService_RegistLocalPack_Ans ans = {};
 			req.strPackFile = strPackName;
-			rc = pClient->RegistLocalPack(req, ans, 10000);
+			rc = (*pClient)(EntityResource::getLink().upgradeLink())->RegistLocalPack(req, ans, 10000);
 			if (rc == Error_Succeed)
 				OutputMsg(CSimpleStringA::Format("手工注册升级包{%s}成功\r\n", (const char*)strPackName));
 			else

+ 2 - 2
Module/mod_healthmanager/HealthManagerFSM.cpp

@@ -1833,7 +1833,7 @@ ErrorCodeEnum CHealthManagerFSM::QueryCheckCode(CSimpleStringA& csCkCode, bool b
 				//		reqG.wSN[0] = 99;
 				//	else
 				//		reqG.wSN[0] = 0;
-				//	eErr = pClient->GetCheckCode(reqG, ansG, 10000);
+				//	eErr = (*pClient)(EntityResource::getLink().upgradeLink())->GetCheckCode(reqG, ansG, 10000);
 				//	if (eErr == Error_Succeed)
 				//	{
 				//		tmpCheckCode = ansG.checkcode[0];
@@ -2712,7 +2712,7 @@ void CHealthManagerFSM::QueryHardwareInfo(SpReqAnsContext<HealthManagerService_Q
 		ResourceWatcherService_GetThirdPartyInstallState_Req req = {};
 		ResourceWatcherService_GetThirdPartyInstallState_Ans ans = {};
 		req.mode = 1;
-		ec = pClient->GetThirdPartyInstallState(req, ans, 15000);
+		ec = (*pClient)(EntityResource::getLink().upgradeLink())->GetThirdPartyInstallState(req, ans, 15000);
 		if (IS_SUCCEED(ec)) {
 			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("Get Sogou version: %s, %d", ans.version.GetData(), ans.reserverd3);
 			DWORD dwUserCode(HealthManager_UserErrorCode_SogouInput_UsingSDK);

+ 11 - 11
Module/mod_healthmanager/mod_healthmanager.cpp

@@ -375,7 +375,7 @@ int CHealthManagerEntity::SystemRestart(bool bPeriod, bool bImmediately,bool bNo
 			req.ShutdownTime = 1;//oiltmp
 			req.UpTime = 3; //oiltmp
 		}
-		ErrorCodeEnum eErrShutdown = m_pUpsClient->Shutdown(req,ans,10000);
+		ErrorCodeEnum eErrShutdown = (*m_pUpsClient)(EntityResource::getLink().upgradeLink())->Shutdown(req,ans,10000);
 		if (eErrShutdown == Error_Succeed)
 		{
 			//m_lastHour = localTime.wHour;
@@ -509,7 +509,7 @@ ErrorCodeEnum CHealthManagerEntity::SystemShutdownThroughUPS(DWORD msPreShutdown
 	{
 		UpsService_GetStatus_Req req;
 		UpsService_GetStatus_Ans ans;
-		ErrorCodeEnum eErrState = m_pUpsClient->GetStatus(req, ans, 3000);
+		ErrorCodeEnum eErrState = (*m_pUpsClient)(EntityResource::getLink().upgradeLink())->GetStatus(req, ans, 3000);
 		Dbg("current state %d", ans.Status);
 
 	} while (false);
@@ -520,7 +520,7 @@ ErrorCodeEnum CHealthManagerEntity::SystemShutdownThroughUPS(DWORD msPreShutdown
 		UpsService_Shutdown_Ans ans;
 		req.ShutdownTime = msPreShutdown; //刚好可以等到框架退出
 		req.UpTime = msPreRestart; //要求5分钟内拔掉电源来实现真正断电关机
-		ErrorCodeEnum eErrShutdown = m_pUpsClient->Shutdown(req, ans, 10000);
+		ErrorCodeEnum eErrShutdown = (*m_pUpsClient)(EntityResource::getLink().upgradeLink())->Shutdown(req, ans, 10000);
 		if (eErrShutdown == Error_Succeed) {
 			Dbg("Invoke UPS::Shutdown successfully.");
 			result = Error_Succeed;
@@ -860,7 +860,7 @@ void CHealthManagerEntity::OnCheckTimeTimeout()
 	{
 		UpsService_GetStatus_Req req;
 		UpsService_GetStatus_Ans ans;
-		ErrorCodeEnum eErrState = m_pUpsClient->GetStatus(req,ans,3000);
+		ErrorCodeEnum eErrState = (*m_pUpsClient)(EntityResource::getLink().upgradeLink())->GetStatus(req,ans,3000);
 		if (eErrState == Error_Succeed)
 		{
 			m_bGetUpsStateFlag = true;
@@ -1565,7 +1565,7 @@ int CHealthManagerEntity::ConnectUps()
 			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM).setAPI("ConnectUps")("ups entity connected.");
 			UpsService_GetStatus_Req req;
 			UpsService_GetStatus_Ans ans;
-			ErrorCodeEnum eErrState = m_pUpsClient->GetStatus(req, ans, 3000);
+			ErrorCodeEnum eErrState = (*m_pUpsClient)(EntityResource::getLink().upgradeLink())->GetStatus(req, ans, 3000);
 			if (eErrState == Error_Succeed)
 			{
 				m_bGetUpsStateFlag = true;
@@ -1686,7 +1686,7 @@ bool CHealthManagerEntity::VersionRollBack(const char *pVerion)
 	UpgradeMgrService_RollbackUpdate_Req req;
 	req.strVersion = pVerion;
 	UpgradeMgrService_RollbackUpdate_Ans ans;
-	eErr = m_pUpgMgr->RollbackUpdate(req,ans,10000);
+	eErr = (*m_pUpgMgr)(EntityResource::getLink().upgradeLink())->RollbackUpdate(req,ans,10000);
 	if (eErr == Error_Succeed)
 	{
 		DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("VersionRollBack")("version rollback doing.");
@@ -3266,7 +3266,7 @@ void CHealthManagerEntity::DeployTerminal(SpReqAnsContext<HealthManagerService_D
 				ResourceWatcherService_GetThirdPartyInstallState_Ans ans = {};
 				req.mode = 1;
 				Dbg("to invoke...");
-				tmpResult = pClient->GetThirdPartyInstallState(req, ans, 30000);
+				tmpResult = (*pClient)(EntityResource::getLink().upgradeLink())->GetThirdPartyInstallState(req, ans, 30000);
 				if (tmpResult != 0) {
 					tmpMsg = CSimpleStringA::Format("获取安装状态请求失败: %s", SpStrError((ErrorCodeEnum)tmpResult));
 					Dbg(tmpMsg);
@@ -3305,7 +3305,7 @@ void CHealthManagerEntity::DeployTerminal(SpReqAnsContext<HealthManagerService_D
 				/** 健康实体过来的调用,1表示不直接重启机器 [Gifur@202275]*/
 				req.reserved1 = 1;
                 DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("to install...");
-                tmpResult = pClient->InstallThirdPartyProgram(req, ans, 120000);
+                tmpResult = (*pClient)(EntityResource::getLink().upgradeLink())->InstallThirdPartyProgram(req, ans, 120000);
                 if (tmpResult != 0) {
                     tmpMsg = CSimpleStringA::Format("调用安装请求返回错误:%s", SpStrError((ErrorCodeEnum)tmpResult));
                     Dbg(tmpMsg);
@@ -3324,7 +3324,7 @@ void CHealthManagerEntity::DeployTerminal(SpReqAnsContext<HealthManagerService_D
                             ResourceWatcherService_GetThirdPartyInstallState_Req req1 = {};
                             ResourceWatcherService_GetThirdPartyInstallState_Ans ans1 = {};
                             req1.mode = 1;
-                            ErrorCodeEnum tmp1 = pClient->GetThirdPartyInstallState(req1, ans1, 30000);
+                            ErrorCodeEnum tmp1 = (*pClient)(EntityResource::getLink().upgradeLink())->GetThirdPartyInstallState(req1, ans1, 30000);
                             if (tmp1 == Error_Succeed && ans1.status == 1) {
                                 ctx->Ans.array1[0] = ans1.reserverd3;
                             }
@@ -3355,7 +3355,7 @@ void CHealthManagerEntity::DeployTerminal(SpReqAnsContext<HealthManagerService_D
 				ResourceWatcherService_GetThirdPartyInstallState_Ans ans = {};
 				req.mode = 2;
 				Dbg("to invoke...");
-				tmpResult = pClient->GetThirdPartyInstallState(req, ans, 30000);
+				tmpResult = (*pClient)(EntityResource::getLink().upgradeLink())->GetThirdPartyInstallState(req, ans, 30000);
 				if (tmpResult != 0) {
 					tmpMsg = CSimpleStringA::Format("获取安装状态请求失败: %s", SpStrError((ErrorCodeEnum)tmpResult));
 					DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)(tmpMsg);
@@ -3389,7 +3389,7 @@ void CHealthManagerEntity::DeployTerminal(SpReqAnsContext<HealthManagerService_D
 				req.type = 2; //
 				req.reserved1 = req.reserved2 = 0;
 				DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("to install font....");
-				tmpResult = pClient->InstallThirdPartyProgram(req, ans, 60000);
+				tmpResult = (*pClient)(EntityResource::getLink().upgradeLink())->InstallThirdPartyProgram(req, ans, 60000);
 				if (tmpResult != 0) {
 					tmpMsg = CSimpleStringA::Format("调用安装请求返回错误:%s", SpStrError((ErrorCodeEnum)tmpResult));
 					Dbg(tmpMsg);

+ 1 - 1
Module/mod_heartbeat/mod_heartbeat.cpp

@@ -48,7 +48,7 @@ ErrorCodeEnum CHeartBeatEntity::GetEntityErrorList(int &warmLevel,CSimpleStringA
 	SelfCheckerService_GetEntityErrorList_Req req;
 	SelfCheckerService_GetEntityErrorList_Ans ans;
 
-	eErr = m_pSelfCheckerClient->GetEntityErrorList(req,ans,5000);
+	eErr = (*m_pSelfCheckerClient)(EntityResource::getLink().upgradeLink())->GetEntityErrorList(req,ans,5000);
 	if (eErr != Error_Succeed)
 	{
 		DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("GetEntityErrorList failed.%d",eErr);

+ 12 - 12
Module/mod_interactivecontrol/mod_interactivecontrol.cpp

@@ -944,7 +944,7 @@ ErrorCodeEnum CITCtrlEntity::GetHandfreeCallOutVolume(int& nVolume, DWORD dwTime
 		DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("pSipPhoneClient connected success!");
 		PhoneService_GetHandfreeOutVolume_Req req;
 		PhoneService_GetHandfreeOutVolume_Ans ans;
-		rc = m_pSipPhoneClient->GetHandfreeOutVolume(req, ans, 1000);
+		rc = (*m_pSipPhoneClient)(EntityResource::getLink().upgradeLink())->GetHandfreeOutVolume(req, ans, 1000);
 		nVolume = ans.Volume;
 		if(Error_Succeed == rc)
 		{
@@ -972,7 +972,7 @@ ErrorCodeEnum CITCtrlEntity::SetHandfreeCallOutVolume(int nVolume, DWORD dwTimeo
 		PhoneService_SetHandfreeOutVolume_Req req;
 		req.Volume = nVolume;
 		PhoneService_SetHandfreeOutVolume_Ans ans;
-		rc = m_pSipPhoneClient->SetHandfreeOutVolume(req, ans, 1000);
+		rc = (*m_pSipPhoneClient)(EntityResource::getLink().upgradeLink())->SetHandfreeOutVolume(req, ans, 1000);
 		if(Error_Succeed == rc)
 		{
 			DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("set hand free out volume success.");
@@ -998,7 +998,7 @@ ErrorCodeEnum CITCtrlEntity::GetPickupCallOutVolume(int& nVolume, DWORD dwTimeou
 		//DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("pSipPhoneClient connected success!");
 		PhoneService_GetPickupOutVolume_Req req;
 		PhoneService_GetPickupOutVolume_Ans ans;
-		rc = m_pSipPhoneClient->GetPickupOutVolume(req, ans, 1000);
+		rc = (*m_pSipPhoneClient)(EntityResource::getLink().upgradeLink())->GetPickupOutVolume(req, ans, 1000);
 		nVolume = ans.Volume;
 		if(Error_Succeed == rc)
 		{
@@ -1026,7 +1026,7 @@ ErrorCodeEnum CITCtrlEntity::SetPickupCallOutVolume(int nVolume, DWORD dwTimeout
 		PhoneService_SetPickupOutVolume_Req req;
 		req.Volume = nVolume;
 		PhoneService_SetPickupOutVolume_Ans ans;
-		rc = m_pSipPhoneClient->SetPickupOutVolume(req, ans, 1000);
+		rc = (*m_pSipPhoneClient)(EntityResource::getLink().upgradeLink())->SetPickupOutVolume(req, ans, 1000);
 		if(Error_Succeed == rc)
 		{
 			DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("set pickup out volume success.");
@@ -1225,7 +1225,7 @@ ErrorCodeEnum CITCtrlEntity::PlayVideo(CSimpleStringA strVideoName)
 	SalesRecorderSerVice_PlayVideo_Req req;
 	SalesRecorderSerVice_PlayVideo_Ans ans;
 	req.VideoName = CSimpleStringA2W(strVideoName);
-	ErrorCodeEnum rc = m_pSalesRecordClient->PlayVideo(req, ans, 5000);
+	ErrorCodeEnum rc = (*m_pSalesRecordClient)(EntityResource::getLink().upgradeLink())->PlayVideo(req, ans, 5000);
 	if(Error_Succeed == rc){
 		DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("Play video success.");
 	}
@@ -1253,7 +1253,7 @@ ErrorCodeEnum CITCtrlEntity::StartPlaySalesRecordVideo(CSimpleStringA strVideoNa
 	req.WndY = iWndY;
 	req.WndWidth = iWndWidth;
 	req.WndHeight = iWndHeight;
-	ErrorCodeEnum rc = m_pSalesRecordClient->PlaySalesRecord(req, ans, 5000);
+	ErrorCodeEnum rc = (*m_pSalesRecordClient)(EntityResource::getLink().upgradeLink())->PlaySalesRecord(req, ans, 5000);
 	if(Error_Succeed == rc){
 		DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("Play Sales Record success.");
 	}
@@ -1276,7 +1276,7 @@ ErrorCodeEnum CITCtrlEntity::StopShowVideo(CSimpleStringA strVideoName)
 	SalesRecorderSerVice_StopShowVideo_Req req;
 	SalesRecorderSerVice_StopShowVideo_Ans ans;
 	req.VideoName = CSimpleStringA2W(strVideoName);
-	ErrorCodeEnum rc = m_pSalesRecordClient->StopShowVideo(req, ans, 5000);
+	ErrorCodeEnum rc = (*m_pSalesRecordClient)(EntityResource::getLink().upgradeLink())->StopShowVideo(req, ans, 5000);
 	if(Error_Succeed == rc){
 		DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("Stop Show video success.");
 	}
@@ -1300,7 +1300,7 @@ ErrorCodeEnum CITCtrlEntity::SaveVideo(CSimpleStringA strVideoName)
 	SalesRecorderSerVice_SaveVideo_Req req;
 	SalesRecorderSerVice_SaveVideo_Ans ans;
 	req.VideoName = CSimpleStringA2W(strVideoName);
-	ErrorCodeEnum rc = m_pSalesRecordClient->SaveVideo(req, ans, 5000);
+	ErrorCodeEnum rc = (*m_pSalesRecordClient)(EntityResource::getLink().upgradeLink())->SaveVideo(req, ans, 5000);
 	if(Error_Succeed == rc){
 		//DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("Save video success.");
 		DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_USER).setLogCode("QLR040230BZ70301")("save video success.");
@@ -1343,7 +1343,7 @@ ErrorCodeEnum CITCtrlEntity::StartRemoteRecord(CSimpleStringA strVideoName)
 	SalesRecorderSerVice_StartRemoteRecord_Req req;
 	SalesRecorderSerVice_StartRemoteRecord_Ans ans;
 	req.VideoName = strVideoName;
-	ErrorCodeEnum rc = m_pSalesRecordClient->StartRemoteRecord(req, ans, 5000);
+	ErrorCodeEnum rc = (*m_pSalesRecordClient)(EntityResource::getLink().upgradeLink())->StartRemoteRecord(req, ans, 5000);
 	if(Error_Succeed == rc){
 		DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("start remote record success.");
 	}
@@ -1370,7 +1370,7 @@ ErrorCodeEnum CITCtrlEntity::StopRecord(CSimpleStringA strVideoName)
 	SalesRecorderSerVice_StopRecord_Req req;
 	SalesRecorderSerVice_StopRecord_Ans ans;
 	req.VideoName = CSimpleStringA2W(strVideoName);
-	ErrorCodeEnum rc = m_pSalesRecordClient->StopRecord(req, ans, 5000);
+	ErrorCodeEnum rc = (*m_pSalesRecordClient)(EntityResource::getLink().upgradeLink())->StopRecord(req, ans, 5000);
 	if(Error_Succeed == rc){
 		DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("Stop record success.");
 	}
@@ -1786,7 +1786,7 @@ ErrorCodeEnum CITCtrlEntity::StartTransactionRecord(CSimpleStringA strVideoName)
 	RecorderSerVice_StartTransactionRecord_Req req;
 	RecorderSerVice_StartTransactionRecord_Ans ans;
 	req.VideoName = strVideoName;
-	ErrorCodeEnum rc = m_pRecordClient->StartTransactionRecord(req, ans, 5000);
+	ErrorCodeEnum rc = (*m_pRecordClient)(EntityResource::getLink().upgradeLink())->StartTransactionRecord(req, ans, 5000);
 	if (Error_Succeed == rc) {
 		LogWarn(Severity_Middle, Error_Debug, LOG_EVT_START_TRANSACTIONRECORD_SUCCESS, "start transaction record success.");
 	}
@@ -1810,7 +1810,7 @@ ErrorCodeEnum CITCtrlEntity::StopTransactionRecord(CSimpleStringA strVideoName)
 	RecorderSerVice_StopTransactionRecord_Req req;
 	RecorderSerVice_StopTransactionRecord_Ans ans;
 	req.VideoName = strVideoName;
-	ErrorCodeEnum rc = m_pRecordClient->StopTransactionRecord(req, ans, 5000);
+	ErrorCodeEnum rc = (*m_pRecordClient)(EntityResource::getLink().upgradeLink())->StopTransactionRecord(req, ans, 5000);
 	if (Error_Succeed == rc) {
 		LogWarn(Severity_Middle, Error_Debug, LOG_EVT_START_TRANSACTIONRECORD_SUCCESS, "stop transaction record success.");
 	}

+ 2 - 2
Module/mod_mediacontroller/mod_mediacontroller.cpp

@@ -965,8 +965,8 @@ ErrorCodeEnum CMediaControllerEntity::RealSelfCheck()
 		SelfCheckerService_RealCheck_Req req;
 		req.name = GetEntityName();
 		SelfCheckerService_RealCheck_Ans ans;
-		DWORD Timeout = 500;
-		Error = m_pSelfcheckClient->RealCheck(req,ans,Timeout);
+		DWORD Timeout = 500;s
+		Error = (*m_pSelfcheckClient)(EntityResource::getLink().upgradeLink())->RealCheck(req,ans,Timeout);
 		if (Error!=Error_Succeed)
 		{
 			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("RealSelfcheck fail!");

+ 1 - 1
Module/mod_sipphone/mod_sipphone.cpp

@@ -1753,7 +1753,7 @@ ErrorCodeEnum CSIPEntity::RealSelfCheck()
 		req.name = GetEntityName();
 		SelfCheckerService_RealCheck_Ans ans;
 		DWORD Timeout = 500;
-		Error = m_pSelfcheckClient->RealCheck(req,ans,Timeout);
+		Error = (*m_pSelfcheckClient)(EntityResource::getLink().upgradeLink())->RealCheck(req,ans,Timeout);
 		if (Error!=Error_Succeed)
 		{
 			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("RealSelfcheck fail!");