소스 검색

Z991348-1263 #comment 去掉连接不上时的SafeDelete other:去掉连接不上时的SafeDelete

杨诗友80174847 4 년 전
부모
커밋
0125cfa9ec

+ 6 - 6
Module/mod_CardReadAdapter/CardReadAdapterFSM.cpp

@@ -1347,7 +1347,7 @@ void CCardReadAdapterFSM::CheckAndReconnectSession()
 		{
 			if (m_pCardIssuer != NULL)
 			{
-				m_pCardIssuer->SafeDelete();
+				//m_pCardIssuer->SafeDelete();
 				m_pCardIssuer = NULL;
 			}
 			m_pCardIssuer = new CardIssuerService_ClientBase(GetEntityBase());
@@ -1359,7 +1359,7 @@ void CCardReadAdapterFSM::CheckAndReconnectSession()
 					if (cardIssuerCount%120 == 0)//about 10 minutes can't connect to entity
 						Dbg("connect to entity CardIssuer failed.%d", eErr);
 					cardIssuerCount++;
-					m_pCardIssuer->SafeDelete();
+					//m_pCardIssuer->SafeDelete();
 					m_pCardIssuer = NULL;
 				}
 				else
@@ -1375,7 +1375,7 @@ void CCardReadAdapterFSM::CheckAndReconnectSession()
 		{
 			if (m_pContactless != NULL)
 			{
-				m_pContactless->SafeDelete();
+				//m_pContactless->SafeDelete();
 				m_pContactless = NULL;
 			}
 			m_pContactless = new ContactlessCardService_ClientBase(GetEntityBase());
@@ -1387,7 +1387,7 @@ void CCardReadAdapterFSM::CheckAndReconnectSession()
 					if (contactlessCardCount % 120 == 0)//about 10 minutes can't connect to entity
 						Dbg("connect to entity ContactlessCard failed.%d", eErr);
 					contactlessCardCount++;
-					m_pContactless->SafeDelete();
+					//m_pContactless->SafeDelete();
 					m_pContactless = NULL;
 				}
 				else
@@ -1402,7 +1402,7 @@ void CCardReadAdapterFSM::CheckAndReconnectSession()
 		{
 			if (m_pCardSwiper != NULL)
 			{
-				m_pCardSwiper->SafeDelete();
+				//m_pCardSwiper->SafeDelete();
 				m_pCardSwiper = NULL;
 			}
 			m_pCardSwiper = new CardSwiperService_ClientBase(GetEntityBase());
@@ -1414,7 +1414,7 @@ void CCardReadAdapterFSM::CheckAndReconnectSession()
 					if (cardSwiperCount%120 == 0)//about 10 minutes can't connect to entity
 						Dbg("connect to entity CardSwiper failed.%d", eErr);
 					cardSwiperCount++;
-					m_pCardSwiper->SafeDelete();
+					//m_pCardSwiper->SafeDelete();
 					m_pCardSwiper = NULL;
 				}
 				else

+ 4 - 4
Module/mod_cardissuer/CardIssuerFSM.cpp

@@ -4592,7 +4592,7 @@ int CCardIssuerFSM::SyncDataToDB(bool bMaintain[3], bool bSetCaptured)
 	if (eConn != Error_Succeed)
 	{
 		Dbg("SyncDataToDB can't connect to GUIConsole.");
-		pGuiConsoleClient->SafeDelete();
+		//pGuiConsoleClient->SafeDelete();
 		pGuiConsoleClient = NULL;
 		return -1;
 	}
@@ -4668,7 +4668,7 @@ int CCardIssuerFSM::SyncDataToDB(bool bMaintain[3], bool bSetCaptured)
 		eConn = pGuiConsoleClient->SyncMaterialCount(info);
 		Dbg("%d", eConn);
 		pGuiConsoleClient->GetFunction()->CloseSession();
-		pGuiConsoleClient->SafeDelete();
+		//pGuiConsoleClient->SafeDelete();
 		pGuiConsoleClient = NULL;
 		if (eConn != Error_Succeed)
 			return -2;
@@ -4879,7 +4879,7 @@ bool CCardIssuerFSM::RegistCardWhileCaptureCard()
 				if (pGuiConsoleClient != NULL)
 				{
 					pGuiConsoleClient->GetFunction()->CloseSession();
-					pGuiConsoleClient->SafeDelete();
+					//pGuiConsoleClient->SafeDelete();
 					pGuiConsoleClient = NULL;
 				}
 			}
@@ -6096,7 +6096,7 @@ int CCardIssuerFSM::PreOnlineOnStore(SpReqAnsContext<CardIssuerService_PreOnline
 			eErr = pHeartBeatClient->CardActive(req, ans, 60000);
 			Dbg("card active result:%x", eErr);
 			//clear
-			pHeartBeatClient->SafeDelete();
+			//pHeartBeatClient->SafeDelete();
 			pHeartBeatClient = NULL;
 		}
 	}

+ 3 - 3
Module/mod_healthmanager/HealthManagerFSM.cpp

@@ -1229,7 +1229,7 @@ int CHealthManagerFSM::DoInitialization()
 			eErr = m_pInitClient->Connect();
 			if (eErr != Error_Succeed) {
 				Dbg("Initializer connected failed.");
-				m_pInitClient->SafeDelete();
+				//m_pInitClient->SafeDelete();
 				m_pInitClient = NULL;
 				return 2;
 			}
@@ -1396,7 +1396,7 @@ INITIALIZATION:
 						eErrCode = m_pACClient->Connect();
 						if (eErrCode != Error_Succeed) {
 							Dbg("accessauth connected failed.");
-							m_pACClient->SafeDelete();
+							//m_pACClient->SafeDelete();
 							m_pACClient = NULL;
 							StartPinPadEntity();
 							return 1;
@@ -1828,7 +1828,7 @@ int CHealthManagerFSM::USBControl()
 			ErrorCodeEnum eErr = m_pDevCtrlClient->Connect();
 			if (eErr != Error_Succeed) {
 				Dbg("DeviceControl connected failed(%d).",eErr);
-				m_pDevCtrlClient->SafeDelete();
+				//m_pDevCtrlClient->SafeDelete();
 				m_pDevCtrlClient = NULL;
 				return -1;
 			}

+ 4 - 4
Module/mod_healthmanager/mod_healthmanager.cpp

@@ -130,7 +130,7 @@ bool CHealthManagerEntity::DoWatchDog(WatchDogOp eOp)
 				ErrorCodeEnum eErrConn = m_pWatchDogClient->Connect();
 				if (eErrConn != Error_Succeed) {
 					Dbg("WatchDog connected failed.");
-					m_pWatchDogClient->SafeDelete();
+					//m_pWatchDogClient->SafeDelete();
 					m_pWatchDogClient = NULL;
 					break;
 				}
@@ -701,7 +701,7 @@ void CHealthManagerEntity::OnCheckTimeTimeout()
 			m_bGetUpsStateFlag = false;
 			if (eErrState == Error_NetBroken)
 			{
-				m_pUpsClient->SafeDelete();
+				//m_pUpsClient->SafeDelete();
 				m_pUpsClient = NULL;
 			}
 		}
@@ -1208,7 +1208,7 @@ int CHealthManagerEntity::ConnectUps()
 		ErrorCodeEnum eErrConn = m_pUpsClient->Connect();
 		if (eErrConn != Error_Succeed) {
 			Dbg("Ups connected failed(%d).",eErrConn);
-			m_pUpsClient->SafeDelete();
+			//m_pUpsClient->SafeDelete();
 			m_pUpsClient = NULL;
 		}
 		else
@@ -1354,7 +1354,7 @@ void CHealthManagerEntity::ReadMachineDataBySyncSerivce()
 			if (eSync != Error_Succeed)
 			{
 				Dbg("connect to SyncService failed %d.",eSync);
-				m_pSync->SafeDelete();
+				//m_pSync->SafeDelete();
 				m_pSync = NULL;
 			}
 		}

+ 3 - 3
Module/mod_heartbeat/HeartBeatFSM.cpp

@@ -890,7 +890,7 @@ int CHeartBeatFSM::LocalProcessCrossCall(CrossCallReq* reqInfo, const int nBufSi
 			{
 				if (m_pIDClient->QuerySessionClosed())
 				{
-					m_pIDClient->SafeDelete();
+					//m_pIDClient->SafeDelete();
 					m_pIDClient = new IDCertService_ClientBase(GetEntityBase());
 					Dbg("to connect to IDCertificate...");
 					if (m_pIDClient != NULL)
@@ -931,7 +931,7 @@ int CHeartBeatFSM::LocalProcessCrossCall(CrossCallReq* reqInfo, const int nBufSi
 			}
 			else {
 				Dbg("Connect to IDCertificate failed %d", ec);
-				m_pIDClient->SafeDelete();
+				//m_pIDClient->SafeDelete();
 				m_pIDClient = NULL;
 			}
 		}
@@ -948,7 +948,7 @@ int CHeartBeatFSM::LocalProcessCrossCall(CrossCallReq* reqInfo, const int nBufSi
 			{
 				if (m_pPinPadClient->QuerySessionClosed())
 				{
-					m_pPinPadClient->SafeDelete();
+					//m_pPinPadClient->SafeDelete();
 					m_pPinPadClient = new PinPadService_ClientBase(GetEntityBase());
 					Dbg("to connect to PinPad...");
 					if (m_pPinPadClient != NULL)

+ 3 - 3
Module/mod_heartbeat/mod_heartbeat.cpp

@@ -36,7 +36,7 @@ ErrorCodeEnum CHeartBeatEntity::GetEntityErrorList(int &warmLevel,CSimpleStringA
 		if (m_pSelfCheckerClient == NULL)
 		{
 			Dbg("create(new) client failed.");
-			m_pSelfCheckerClient->SafeDelete();
+			//m_pSelfCheckerClient->SafeDelete();
 			m_pSelfCheckerClient = NULL;
 			return Error_Resource;
 		}
@@ -53,7 +53,7 @@ ErrorCodeEnum CHeartBeatEntity::GetEntityErrorList(int &warmLevel,CSimpleStringA
 		if (eErrConn != Error_Succeed || eErr != Error_Succeed)
 		{
 			Dbg("connect to selfchecker failed.");
-			m_pSelfCheckerClient->SafeDelete();
+			//m_pSelfCheckerClient->SafeDelete();
 			m_pSelfCheckerClient = NULL;
 			return Error_Unexpect;
 		}
@@ -69,7 +69,7 @@ ErrorCodeEnum CHeartBeatEntity::GetEntityErrorList(int &warmLevel,CSimpleStringA
 	{
 		Dbg("GetEntityErrorList failed.%d",eErr);
 		m_bConnetedSS = false;
-		m_pSelfCheckerClient->SafeDelete();
+		//m_pSelfCheckerClient->SafeDelete();
 		m_pSelfCheckerClient = NULL;
 		return eErr;
 	}

+ 1 - 1
Module/mod_selfchecker/SelfCheckerFSM.cpp

@@ -1568,7 +1568,7 @@ ErrorCodeEnum CSelfCheckerFSM::ConnectToHealthManager()
 		m_pHealthClient = new HealthManagerClient(GetEntityBase());
 		ErrorCodeEnum ErrorConn = m_pHealthClient->Connect();
 		if (ErrorConn != Error_Succeed) {
-			m_pHealthClient->SafeDelete();
+			//m_pHealthClient->SafeDelete();
 			m_pHealthClient = NULL;
 			Dbg("Connect to Healthmanager failed.%d", ErrorConn);
 			return Error_Unexpect;

+ 4 - 4
Module/mod_selfchecker/mod_selfchecker.cpp

@@ -137,7 +137,7 @@ void CSelfCheckerEntity::OnEntityStateHook(const char *pszEntityName,const char
 			{
 				if (m_pAssChanClient != NULL)
 				{
-					m_pAssChanClient->SafeDelete();
+					//m_pAssChanClient->SafeDelete();
 					m_pAssChanClient = NULL;
 				}
 				
@@ -320,7 +320,7 @@ ErrorCodeEnum CSelfCheckerEntity::ConnectToAssistChannel()
 		m_pAssChanClient = new AssistChannelSelfCheckerClient(this);
 		ErrorCodeEnum ErrorConn = m_pAssChanClient->Connect();
 		if (ErrorConn != Error_Succeed) {
-			m_pAssChanClient->SafeDelete();
+			//m_pAssChanClient->SafeDelete();
 			m_pAssChanClient = NULL;
 			return Error_Unexpect;
 		}
@@ -334,7 +334,7 @@ ErrorCodeEnum CSelfCheckerEntity::ConnectToAssistChannel()
 				{
 					Dbg("BeginState biz channel failed!");
 					m_pAssChanClient->GetFunction()->CloseSession();
-					m_pAssChanClient->SafeDelete();
+					//m_pAssChanClient->SafeDelete();
 					m_pAssChanClient = NULL;
 					return Error_Unexpect;
 					//pTransactionContext->SendAnswer(ErrorConn);
@@ -354,7 +354,7 @@ ErrorCodeEnum CSelfCheckerEntity::ConnectToAssistChannel()
 				{
 					Dbg("Begin BeginRecv ACM_TYPE_DEVICE failed!");
 					m_pAssChanClient->GetFunction()->CloseSession();
-					m_pAssChanClient->SafeDelete();
+					//m_pAssChanClient->SafeDelete();
 					m_pAssChanClient = NULL;
 					return Error_Unexpect;
 					//pTransactionContext->SendAnswer(Error);