|
@@ -4584,13 +4584,14 @@ int CCardIssuerFSM::SyncDataToDB(bool bMaintain[3], bool bSetCaptured)
|
|
|
{
|
|
|
Dbg("to connect to guiconsole");
|
|
|
eConn = pGuiConsoleClient->Connect();
|
|
|
+ if(eConn != Error_Succeed)
|
|
|
+ pGuiConsoleClient->SafeDelete();
|
|
|
}
|
|
|
else
|
|
|
Dbg("new pGuiConsoleClient failed.");
|
|
|
if (eConn != Error_Succeed)
|
|
|
{
|
|
|
Dbg("SyncDataToDB can't connect to GUIConsole.");
|
|
|
- //pGuiConsoleClient->SafeDelete();
|
|
|
pGuiConsoleClient = NULL;
|
|
|
return -1;
|
|
|
}
|
|
@@ -4666,7 +4667,6 @@ int CCardIssuerFSM::SyncDataToDB(bool bMaintain[3], bool bSetCaptured)
|
|
|
eConn = pGuiConsoleClient->SyncMaterialCount(info);
|
|
|
Dbg("%d", eConn);
|
|
|
pGuiConsoleClient->GetFunction()->CloseSession();
|
|
|
- //pGuiConsoleClient->SafeDelete();
|
|
|
pGuiConsoleClient = NULL;
|
|
|
if (eConn != Error_Succeed)
|
|
|
return -2;
|
|
@@ -4877,7 +4877,6 @@ bool CCardIssuerFSM::RegistCardWhileCaptureCard()
|
|
|
if (pGuiConsoleClient != NULL)
|
|
|
{
|
|
|
pGuiConsoleClient->GetFunction()->CloseSession();
|
|
|
- //pGuiConsoleClient->SafeDelete();
|
|
|
pGuiConsoleClient = NULL;
|
|
|
}
|
|
|
}
|
|
@@ -6070,8 +6069,11 @@ int CCardIssuerFSM::PreOnlineOnStore(SpReqAnsContext<CardIssuerService_PreOnline
|
|
|
HeartBeatService_ClientBase *pHeartBeatClient = NULL;
|
|
|
ErrorCodeEnum eErr = Error_Unexpect;
|
|
|
pHeartBeatClient = new HeartBeatService_ClientBase(GetEntityBase());
|
|
|
- if (pHeartBeatClient != NULL)
|
|
|
+ if (pHeartBeatClient != NULL) {
|
|
|
eErr = pHeartBeatClient->Connect();
|
|
|
+ if(eErr != Error_Succeed)
|
|
|
+ pHeartBeatClient->SafeDelete();
|
|
|
+ }
|
|
|
else
|
|
|
{
|
|
|
Dbg("pGuiConsoleClient is null?");
|
|
@@ -6093,8 +6095,7 @@ int CCardIssuerFSM::PreOnlineOnStore(SpReqAnsContext<CardIssuerService_PreOnline
|
|
|
req.slot = ctx->Req.slot;
|
|
|
eErr = pHeartBeatClient->CardActive(req, ans, 60000);
|
|
|
Dbg("card active result:%x", eErr);
|
|
|
- //clear
|
|
|
- //pHeartBeatClient->SafeDelete();
|
|
|
+ pHeartBeatClient->GetFunction()->CloseSession();
|
|
|
pHeartBeatClient = NULL;
|
|
|
}
|
|
|
}
|