浏览代码

Z991239-527 #comment feature: iniutil 新增 inifile_read_str_s 接口;更新集中配置文件到 156

gifur 5 年之前
父节点
当前提交
403dc55b64

+ 3 - 45
Module/mod_CenterSetting/mod_centersetting.cpp

@@ -16,33 +16,6 @@ CServerSessionBase *CCenterSettingEntity::OnNewSession(const char* /*pszRemoteEn
 
  void CCenterSettingEntity::OnStarted()
  {
-	 //MessageBox(0, 0, 0, 0);
-
-	 // 读取当前同步信息
-	 //CSmartPointer<IConfigInfo> pConfig;
-	 //auto rc = GetFunction()->OpenConfig(Config_CenterSetting, pConfig);
-	 //assert(rc == Error_Succeed);
-	 //int nSyncTime(0);
-	 //rc = pConfig->ReadConfigValueInt("Main", "SyncTime", nSyncTime);
-	 //if (rc == Error_Succeed)
-		// m_dwLastSyncTime = nSyncTime;
-	 //else
-		// m_dwLastSyncTime = 0;
-
-	 //CSimpleStringA strSyncHash;
-	 //rc = pConfig->ReadConfigValue("Main", "SyncHash", strSyncHash);
-	 //if (rc == Error_Succeed)
-		// m_strSyncFileHash = strSyncHash;
-	 //else
-		// m_strSyncFileHash = "";
-
-	 //CSimpleStringA strSyncFile;
-	 //rc = pConfig->ReadConfigValue("Main", "SyncFile", strSyncFile);
-	 //if (rc == Error_Succeed)
-		// m_strSyncFileName = strSyncFile;
-	 //else
-		// m_strSyncFileName = "";
-
 	 auto pFunc = GetFunction();
 	 CSimpleStringA strPath;
 	 pFunc->GetPath("Cfg", strPath);
@@ -59,20 +32,10 @@ CServerSessionBase *CCenterSettingEntity::OnNewSession(const char* /*pszRemoteEn
 			 if (ExtractSiteFromFileName(pszFile, info.strFileName, strSite))
 			 {
 				 char szTmp[64];
-				 char* result = inifile_read_str(pszFile, "Main", "SyncHash", "");
-				 //::GetPrivateProfileStringA("Main", "SyncHash", "", szTmp, 64, pszFile);
-				 if (result) {
-					 strcpy(szTmp, result);
-					 FREE(result);
-				 }
+				 inifile_read_str_s("Main", "SyncHash", "", szTmp, 64, pszFile);
 				 info.strFileHash = szTmp;
 
-				 result = inifile_read_str(pszFile, "Main", "SyncTime", "");
-				 if (result) {
-					 strcpy(szTmp, result);
-					 FREE(result);
-				 }
-				 //::GetPrivateProfileStringA("Main", "SyncTime", "", szTmp, 64, pszFile);
+				 inifile_read_str_s("Main", "SyncTime", "", szTmp, 64, pszFile);
 				 DWORD nValue;
 				 sscanf(szTmp, "0x%X", &nValue);
 				 info.dwSyncTime = nValue;
@@ -90,12 +53,7 @@ CServerSessionBase *CCenterSettingEntity::OnNewSession(const char* /*pszRemoteEn
 
 	 // 缓存当前RVCWeb版本
 	 char szVersion[64] = {};
-	 char* result = inifile_read_str(strFilePath, "IEBrowser", "RvcWebVersion", "");
-	 if (result) {
-		 strcpy(szVersion, result);
-		 FREE(result);
-	 }
-	 //::GetPrivateProfileStringA("IEBrowser", "RvcWebVersion", "", szVersion, 64, strFilePath);
+	 inifile_read_str_s("IEBrowser", "RvcWebVersion", "", szVersion, 64, strFilePath);
 	 m_strRvcWebVersion = szVersion;
 
 	 // 立刻同步配置

+ 180 - 60
addin/cfg/CenterSetting.DMZ.ini

@@ -1,101 +1,221 @@
 [CenterSetting]
-Server=88.88.88.130 1024
-Server_Backup=88.88.88.130 1024
-
+Server=99.12.98.156 6024
+Server_Backup=99.12.98.156 6024
 
 [AccessAuthorization]
-Server=88.88.88.130 1031
-Server_Backup=88.88.88.130 1031
+Server=99.12.98.156 6031
+Server_Backup=99.12.98.156 6031
+CheckMD5=0
+
+[LivenessDetection]
+LoosePassiveStrategy=1
+SaveLivenessResult=1
+ActiveTimeLimit=15
+LeastActiveShowTime=5
 
 [Alarm]
-Server=88.88.88.130 1025
-Server_Backup=88.88.88.130 1025
+Server=99.12.98.156 6025
+Server_Backup=99.12.98.156 6025
+DealWarningTime=1
 
 [CounterConnector]
-sip_proxy_ip =88.88.88.129
+sip_proxy_ip =99.1.100.221
+;sip_proxy_ip =99.1.100.227
 sip_proxy_port = 5080
-sip_default_call_no = 1007
-sip_proxy_ip_backup =88.88.88.129
-sip_proxy_port_backup =5080
-sip_default_call_no_backup = 1006
-chan_proxy_ip =88.88.88.129
+;sip_proxy_port = 5060
+sip_default_call_no = 1008
+;sip_default_call_no = 843215022
+chan_proxy_ip =99.1.100.215
 chan_proxy_port = 2323
-chan_default_call_no = 9991
-chan_proxy_ip_backup =88.88.88.129
-chan_proxy_port_backup =2323
+chan_default_call_no = 9990
+sip_proxy_ip_backup =99.1.100.221
+sip_proxy_port_backup = 5060
+sip_default_call_no_backup = 43215011
+chan_proxy_ip_backup =99.1.100.215
+chan_proxy_port_backup = 2323
 chan_default_call_no_backup = 9990
 
+[CardIssuer]
+Scanslot=5
+keba=Trace
+All=Info
+
+
+[CardSwiper]
+keba=Trace
+All=Info
+
+[IDCertificate]
+keba=Trace
+All=Info
+
+[PinPad]
+keba=Trace
+All=Info
+
+[FingerPrint]
+keba=Trace
+All=Info
+
+[ContactlessCard]
+keba=Trace
+All=Info
+
+[HSPSCanner]
+keba=Trace
+All=Info
+
+[GPIO]
+keba=Trace
+All=Info
+
+[Ups]
+keba=Trace
+All=Info
+
+[DeviceControl]
+keba=Trace
+All=Info
+
+[CustMngrAuth]
+Server=99.12.98.156 6640
+Server_Backup=99.12.98.156 6640
+
 [Download]
-Server=88.88.88.130 1027
-Server_Backup=88.88.88.130 1027
+Server=99.12.98.156 6027
+Server_Backup=99.12.98.156 6027
 
 [GUIConsole]
-Server=88.88.88.130 1036
-Server_Backup=88.88.88.130 1036
+Server=99.12.98.156 6036
+Server_Backup=99.12.98.156 6036
 
 [HealthManager]
-IEBrowser.RVC.Stand2S.Url=http://10.30.0.98/RVC.Web/default.aspx http://10.30.0.98/RVC.Web/default2.aspx
-IEBrowser.RVC.PAD.Url=http://88.88.88.130/RVC.PAD.Web/default.aspx http://88.88.88.130/RVC.PAD.Web/default2.aspx
-IEBrowser.RVC.CardStore.URL=http://10.30.0.98/RVC.Web/default.aspx http://10.30.0.98/RVC.Web/default2.aspx
+IEBrowser.RVC.Stand2S.URL=http://99.6.136.67/RVC.Web/default.aspx http://99.6.136.67/RVC.Web/default2.aspx
+IEBrowser.RVC.PAD.URL=http://99.12.74.90/RVC.Web.800/default.aspx http://99.12.74.90/RVC.Web.800/default2.aspx
+IEBrowser.RPM.Stand1S.URL=http://99.12.74.90/RVC.Web.800/default.aspx http://99.12.74.90/RVC.Web.800/default2.aspx
+IEBrowser.RVC.Desk2S.URL=http://99.6.136.67/RVC.CMF.Web/default.aspx http://99.6.136.67/RVC.CMF.Web/default2.aspx
+IEBrowser.RVC.CardStore.URL=http://99.12.74.90/RVC.Web.800/default.aspx http://99.12.74.90/RVC.Web.800/default2.aspx
+IEBrowser.RVC.IL.URL=http://99.1.100.217/RVC.YZX.Web/default.aspx http://99.1.100.217/RVC.YZX.Web/default2.aspx
+IEBrowser.RVC.Desk1S.URL=http://99.6.136.67/RVC.Web/default.aspx http://99.6.136.67/RVC.Web/default2.aspx
+
+
+[Chromium]
+;UserMgrUrl=http://99.1.100.217/RVC.Desk2S.Web/UserMgrTest
+;extendOpen=2
+UserMgrUrl=http://99.1.100.217/RVC.Desk2S.Web/UserMgrN
+UserMgrUrlNoSidebar=http://99.1.100.217/RVC.Desk2S.Web/UserMgrNoSideBar
+UserMgrUrlFulture=http://99.12.74.90/RVC.H5.Web
+
 [HeartBeat]
-Server=88.88.88.130 1032
-Server_Backup=88.88.88.130 1032
+Server=99.12.98.156 6032
+Server_Backup=99.12.98.156 6032
+
+[HolderContext]
+Server=99.12.98.156 6030
+Server_Backup=99.12.98.156 6030
 
 [Initializer]
-Server=88.88.88.130 1031
-Server_Backup=88.88.88.130 1031
-SubBankNo=0020
+Server=99.12.98.156 6031
+Server_Backup=99.12.98.156 6031
+SubBankNo=0755
 BranchNo=001
-SupportUkey=1
+SupportUkey=0
 
 [MaintainWatcher]
-Server=88.88.88.130 6043
-Server_Backup=88.88.88.130 6043
+Server=99.12.98.156 6043
+Server_Backup=99.12.98.156 6043
+CheckTerMinalNo=0
+CheckMaintainTask=0
+Verify_BlackList=1
+
+[PrintSeal]
+PaperEmpty_Timeout=5
+PaperType_Count=2
+PaperType_1=ÆÕͨA4
+PaperSize_1=A4
+PaperWidth_1=210
+PaperHeight_1=297
+PaperType_2=´æ¿îÖ¤Ã÷
+PaperSize_2=A4
+PaperWidth_2=210
+PaperHeight_2=297
+
+[localmediaplay]
+Server=99.12.98.156 8796
+Server_Backup=99.12.98.156 8796
 
 [RemoteController]
-Server=88.88.88.130 1033
-Server_Backup=88.88.88.130 1033
+Server=99.12.98.156 6033
+Server_Backup=99.12.98.156 6033
 
 [UpgradeManager]
-Server=88.88.88.130 1034
-Server_Backup=88.88.88.130 1034
+Server=99.12.98.156 6034
+Server_Backup=99.12.98.156 6034
 
 [Upload]
-Server=88.88.88.130 1026
-Server_Backup=88.88.88.130 1026
+Server=99.12.98.156 6026
+Server_Backup=99.12.98.156 6026
+
+
+[UpLog]
+Server=99.12.98.156 1045
+Server_Backup=99.12.98.156 1045
+BranchSendLog=1
+SendMode=0
+TerminalList=
+LogType=
 
-[MobileDial]
-Server=88.88.88.130 1032
-Server_Backup=88.88.88.130 1032
 
 [IEBrowser]
-RvcWebVersion=3.53.0.0
+RvcWebVersion=1.2.1
+TermLimitSwitch=OFF
 
-[LivenessDetection]
-SaveLivenessResult=false
-PassiveTimeLimit=300
-ActiveTimeLimit=120
-LeastActiveShowTime=5
-LoosePassiveStrategy=1
-ActiveTimeLimit=15
+[MachineBridge]
+Server=99.12.98.156 6037
+Server_Backup=99.12.98.156 6037
 
-[localmediaplay]
-Server=88.88.88.130 1051
-Server_Backup=88.88.88.130 1051
+[MobileDial]
+Server=99.12.98.156 6032 
+Server_Backup=99.12.98.156 6032
 
-[systemcustomization]
+[InteractiveControl]
+SurveillanceRecordAllowed=1
+SalesRecordPriorityEws=0
+
+[SpBase]
+DualActive=1
+ReadEach=1
+VerifyCodeSign=0
+
+[SystemCustomization]
 NotCheckUpdateServer=1
+ReportErrMsg=1
+
+[SurveillanceRecorder]
+Server=99.12.98.156 6028
+Server_Backup=99.12.98.156 6028
+AutoMode=0
+MaxDiskPercent=99
+SecondBranchAllowed=1
+SecondBranchParams=771|0
+
+[Recorder]
+Server=99.12.98.156 6028
+Server_Backup=99.12.98.156 6028
+MaxDiskPercent=95
 
-[SalesRecorder] 
-Server=88.88.88.130 1028
-Server_Backup=88.88.88.130 1028
+[SalesRecorder]
+Server=99.12.98.156 6028
+Server_Backup=99.12.98.156 6028
 MaxDiskPercent=95
 AudioSampleRate=8
 AudioBitRate=128
 WholeSection=0
 ApplyHighQuality=1
-[Main]
-LastServer=88.88.88.130 1024
-SyncTime=0x2570247A
-SyncHash=84261381dab61a122a87e9dffed0f943
-SyncFile=CenterSetting.DMZ.ini
+
+[FaceRecognition]
+Height=112
+Width=112
+Mean=127.5
+Std=128.0
+RecognitionThresHold=0.70

+ 187 - 66
addin/cfg/CenterSetting.LAN.ini

@@ -1,57 +1,130 @@
 [CenterSetting]
-Server=10.30.0.91 1024
-Server_Backup=10.30.0.91 1024
-
+Server=99.12.98.156 6024
+Server_Backup=99.12.98.156 6024
 
 [AccessAuthorization]
-Server=10.30.0.91 1031
-Server_Backup=10.30.0.91 1031
+Server=99.12.98.156 6031
+Server_Backup=99.12.98.156 6031
+CheckMD5=0
+
+[LivenessDetection]
+LoosePassiveStrategy=1
+SaveLivenessResult=1
+ActiveTimeLimit=15
+LeastActiveShowTime=5
+SendInfoInterval=1000
 
 [Alarm]
-Server=10.30.0.91 1025
-Server_Backup=10.30.0.91 1025
+Server=99.12.98.156 6025
+Server_Backup=99.12.98.156 6025
+DealWarningTime=1
 
 [CounterConnector]
-sip_proxy_ip =10.30.0.13
+sip_proxy_ip =99.1.100.227
 sip_proxy_port = 5060
-sip_default_call_no = 43235011
-chan_proxy_ip =10.30.0.93
+sip_default_call_no = 843215022
+chan_proxy_ip =99.1.100.215
 chan_proxy_port = 2323
-chan_default_call_no = 9991
-sip_proxy_ip_backup =10.30.0.14
-sip_proxy_port_backup =5060
-sip_default_call_no_backup = 43235011
-chan_proxy_ip_backup =10.30.0.93
+chan_default_call_no = 9990
+sip_proxy_ip_backup =99.1.100.221
+sip_proxy_port_backup = 5060
+sip_default_call_no_backup = 43215011
+chan_proxy_ip_backup =99.1.100.215
 chan_proxy_port_backup = 2323
-chan_default_call_no_backup = 9991
+chan_default_call_no_backup = 9990
+
+[CardIssuer]
+Scanslot=5
+keba=Trace
+All=Info
+
+[CardSwiper]
+keba=Trace
+All=Info
+
+[IDCertificate]
+keba=Trace
+All=Info
+
+[PinPad]
+keba=Trace
+All=Info
+
+[FingerPrint]
+keba=Trace
+All=Info
+
+[ContactlessCard]
+keba=Trace
+All=Info
+
+[HSPSCanner]
+keba=Trace
+All=Info
+
+[GPIO]
+keba=Trace
+All=Info
+
+[Ups]
+keba=Trace
+All=Info
+
+[DeviceControl]
+keba=Trace
+All=Info
+
+[CustMngrAuth]
+Server=99.12.98.156 6640 
+Server_Backup=99.12.98.156 6640 
 
 [Download]
-Server=10.30.0.91 1027
-Server_Backup=10.30.0.91 1027
+Server=99.12.98.156 6027
+Server_Backup=99.12.98.156 6027
 
 [GUIConsole]
-Server=10.30.0.91 1036
-Server_Backup=10.30.0.91 1036
+Server=99.12.98.156 6036
+Server_Backup=99.12.98.156 6036
+
+
 
 [HealthManager]
-IEBrowser.RVC.Stand2S.Url=http://10.30.0.98/RVC.Web/default.aspx http://10.30.0.98/RVC.Web/default2.aspx
-IEBrowser.RVC.PAD.Url=http://10.30.0.98/RVC.PAD.Web/default.aspx http://10.30.0.98/RVC.PAD.Web/default2.aspx
-IEBrowser.RPM.Stand1S.Url=http://10.30.0.98/RVC.PAD.Web/default.aspx http://10.30.0.98/RVC.PAD.Web/default2.aspx
-IEBrowser.RVC.CardStore.URL=http://10.30.0.98/RVC.Web/default.aspx http://10.30.0.98/RVC.Web/default2.aspx
+IEBrowser.RVC.Stand2S.URL=http://99.6.136.67/RVC.Web/default.aspx http://99.6.136.67/RVC.Web/default2.aspx
+IEBrowser.RVC.PAD.URL=http://99.6.136.67/RVC.Web/default.aspx http://99.6.136.67/RVC.Web/default2.aspx
+IEBrowser.RPM.Stand1S.URL=http://99.12.74.90/RVC.Web.800/default.aspx http://99.12.74.90/RVC.Web.800/default2.aspx
+IEBrowser.RVC.Desk2S.URL=http://99.6.136.67/RVC.Web/default.aspx http://99.6.136.67/RVC.Web/default2.aspx
+IEBrowser.RVC.Desk1S.URL=http://99.6.136.67/RVC.Web/default.aspx http://99.6.136.67/RVC.Web/default2.aspx
+IEBrowser.RVC.CardStore.URL=http://99.6.136.67/RVC.Web/default.aspx http://99.6.136.67/RVC.Web/default2.aspx
+
+                      
+[Chromium]
+;UserMgrUrl=http://99.1.100.217/RVC.Desk2S.Web/UserMgrTest
+;extendOpen=2
+UserMgrUrl=http://99.1.100.217/RVC.Desk2S.Web/UserMgrN
+UserMgrUrlNoSidebar=http://99.6.136.67/RVC.Desk2S.Web/UserMgrNoSideBar
+UserMgrUrlFulture=http://99.12.74.90/RVC.H5.Web
+
 [HeartBeat]
-Server=10.30.0.91 1032
-Server_Backup=99.1.100.215 1032
+Server=99.12.98.156 6032
+Server_Backup=99.12.98.156 6032
+
+[HolderContext]
+Server=99.12.98.156 6030
+Server_Backup=99.12.98.156 6030
 
 [Initializer]
-Server=10.30.0.91 1031
-Server_Backup=10.30.0.91 1031
-SubBankNo=0020
+Server=99.12.98.156 6031
+Server_Backup=99.12.98.156 6031
+SubBankNo=0755
 BranchNo=001
-SupportUkey=1
+SupportUkey=0
 
 [MaintainWatcher]
-Server=10.30.0.91 6043
-Server_Backup=10.30.0.91 6043
+Server=99.12.98.156 6043
+Server_Backup=99.12.98.156 6043
+CheckTerMinalNo=0
+CheckMaintainTask=0
+Verify_BlackList=1
 
 [PrintSeal]
 PaperEmpty_Timeout=5
@@ -65,54 +138,102 @@ PaperSize_2=A4
 PaperWidth_2=210
 PaperHeight_2=297
 
+[localmediaplay]
+Server=99.12.98.156 8796
+Server_Backup=99.12.98.156 8796
+
 [RemoteController]
-Server=10.30.0.91 1033
-Server_Backup=10.30.0.91 1033
+Server=99.12.98.156 6033
+Server_Backup=99.12.98.156 6033
 
 [UpgradeManager]
-Server=10.30.0.91 1034
-Server_Backup=10.30.0.91 1034
+Server=99.12.98.156 6034
+Server_Backup=99.12.98.156 6034
+
 
 [Upload]
-Server=10.30.0.91 1026
-Server_Backup=10.30.0.91 1026
+Server=99.12.98.156 6026
+Server_Backup=99.12.98.156 6026
 
-[CardIssuer]
-CaptureFlag=1
 
-[MobileDial]
-Server=10.30.0.91 1032
-Server_Backup=10.30.0.92 1032
-[IEBrowser]
-RvcWebVersion=2.122.0.0
+[UpLog]
+Server=99.12.98.156 1045
+Server_Backup=99.12.98.156 1045
+SendMode=1
+BranchSendLog=1
+TerminalList=
+LogType=
 
-[LivenessDetection]
-SaveLivenessResult=false
-PassiveTimeLimit=300
-ActiveTimeLimit=120
-LeastActiveShowTime=5
-LoosePassiveStrategy=1
-ActiveTimeLimit=15
 
-[HolderContext]
-Server=10.30.0.91 1035
-Server_Backup=10.30.0.91 1035 
+[IEBrowser]
+RvcWebVersion=3.74.1.0
+TermLimitSwitch=OFF
+;Sites-RVC.PAD=http://99.1.100.217/RVC.YZX.Web;http://99.12.74.9/RVC.Web
+;Sites-RVC.Stand2S=http://99.12.74.9/RVC.Web;http://99.1.100.217/RVC.YZX.Web
+;Sites-RPM.Stand1S=http://99.12.74.9/RVC.Web;http://99.1.100.217/RVC.YZX.Web
+;Sites-RVC.Desk2S=http://99.12.74.9/RVC.Web;http://99.1.100.217/RVC.YZX.Web
+;Sites-RVC.CardStore=http://99.12.74.9/RVC.Web;http://99.1.100.217/RVC.YZX.Web
+[MachineBridge]
+Server=99.12.98.156 6037
+Server_Backup=99.12.98.156 6037
 
-[localmediaplay]
-Server=10.30.0.91 1051
-Server_Backup=10.30.0.91 1051
+[MobileDial]
+Server=99.12.98.156 6032 
+Server_Backup=99.12.98.156 6032 
+
+[InteractiveControl]
+SurveillanceRecordAllowed=1
+SalesRecordPriorityEws=0
+
+[LocalMediaPlay]
+Server=99.12.98.156 8796
+Server_Backup=99.12.98.156 8796
+
+[SpBase]
+DualActive=1
+ReadEach=1
+VerifyCodeSign=0
+
+[SystemCustomization]
+NotCheckUpdateServer=1
+ReportErrMsg=1
+
+[SurveillanceRecorder]
+Server=99.12.98.156 6028
+Server_Backup=99.12.98.156 6028
+AutoMode=0
+MaxDiskPercent=99
+SecondBranchAllowed=1
+SecondBranchParams=771|0
+
+[Recorder]
+Server=99.12.98.156 6028
+Server_Backup=99.12.98.156 6028
+MaxDiskPercent=95
+
+[Main]
+LastServer=99.12.98.156 6024
+SyncTime=0x23D4886D
+SyncHash=c171c6e76b43f5d0b9e4e7d43406909e
+SyncFile=CenterSetting.LAN.ini
 
-[SalesRecorder] 
-Server=10.30.0.91 1028
-Server_Backup=10.30.0.91 1028
+[SalesRecorder]
+Server=99.12.98.156 6028
+Server_Backup=99.12.98.156 6028
 MaxDiskPercent=95
 AudioSampleRate=8
 AudioBitRate=128
 WholeSection=0
 ApplyHighQuality=1
 
-[Main]
-LastServer=99.12.98.156 6024
-SyncTime=0x2540BA12
-SyncHash=c3adfba10a822561d4725e4937ba86d3
-SyncFile=CenterSetting.LAN.ini
+[FaceRecognition]
+Height=112
+Width=112
+Mean=127.5
+Std=128.0
+RecognitionThresHold=0.75
+FaceRollAngleThres=5
+BrisqueScoreThres=45.0
+FaceLightThres=0.7
+
+

+ 12 - 0
libtoolkit/iniutil.c

@@ -9,6 +9,18 @@
 
 #include "memutil.h"
 
+TOOLKIT_API int inifile_read_str_s(
+	const char* section, const char* key, const char* defval, char* retval, int val_size, const char* file)
+{
+	char* result = inifile_read_str(file, section, key, defval);
+	memset(retval, '\0', val_size);
+	if (result) {
+		strcpy_s(retval, val_size, result);
+		free(result);
+	}
+	return strlen(retval);
+}
+
 TOOLKIT_API char* inifile_read_str(const char* file,
 	const char* section,
 	const char* key,

+ 3 - 0
libtoolkit/iniutil.h

@@ -22,6 +22,9 @@ extern "C" {
 
 #include "array.h"
 
+/** return length of retval*/
+TOOLKIT_API int inifile_read_str_s(const char* section, const char* key, const char* defval, char* retval, int val_size, const char* file);
+
 /** please remember to FREE the returned char*-type value if not null*/
 TOOLKIT_API char *inifile_read_str(const char *file, const char *section, const char *key, const char *defval);
 TOOLKIT_API int inifile_read_int(const char *file, const char *section, const char *key, int defval);

+ 5 - 5
spbase/SpSecureClient.cpp

@@ -72,15 +72,15 @@ bool SpSecureClient::Connect(const char *pServerAddr, int nPort, int nOption) //
 {
 	assert(m_pEntity != NULL);	
 	
-	
 	bool result = false;
+
+	Dbg("connect to %s:%d, option=%d...", pServerAddr, nPort, nOption);
+
 	if (GetFunction()->Connect(pServerAddr, nPort, nOption))
 	{
 		m_bClosed = false;
 		result = true;
 	}
-	else
-		result = false;
 
 	Dbg("connect to %s:%d, option=%d, result:%s", pServerAddr, nPort, nOption, result ? "SUCCESS" : "FAIL");
 	return result;
@@ -335,7 +335,7 @@ bool SpSecureClient::Connect_Single(ENTITY_CONNECT_INFO *connectInfo, int option
 {
 	if (NULL == connectInfo || 0 == strlen(connectInfo->m_EntityName))
 		return false;
-	Dbg("mod %s using option %d", connectInfo->m_EntityName, option);
+	Dbg("single connect, entity %s using option %d", connectInfo->m_EntityName, option);
 
 	if (Connect(connectInfo->m_ServerIP, connectInfo->m_ServerPort, option))
 		connectInfo->m_currentLink = 0;
@@ -402,7 +402,7 @@ bool SpSecureClient::Connect_Dual(ENTITY_CONNECT_INFO *connectInfo, int option)
 		}
 			
 
-		Dbg("mod %s using option %d", connectInfo->m_EntityName, option);
+		Dbg("dual connection, entity %s using option %d", connectInfo->m_EntityName, option);
 		if (0 == strlen(connectInfo->m_Server_BackupIP) && 0 == strlen(connectInfo->m_ServerIP))
 			connectInfo->m_currentLink = -1;
 		else if (0 == strlen(connectInfo->m_Server_BackupIP))