@@ -125,7 +125,7 @@ BOOL CConfig_Json::Config_Json_File(LPCTSTR lpszConfigFile,XENGINE_SERVERCONFIG
125125 _tcscpy (pSt_ServerConfig->st_XSql .tszSQLPass , st_JsonXSql[" SQLPass" ].asCString ());
126126 _tcscpy (pSt_ServerConfig->st_XSql .tszSQLFile , st_JsonXSql[" SQLFile" ].asCString ());
127127
128- if (st_JsonRoot[" XStorage" ].empty () || (4 != st_JsonRoot[" XStorage" ].size ()))
128+ if (st_JsonRoot[" XStorage" ].empty () || (3 != st_JsonRoot[" XStorage" ].size ()))
129129 {
130130 Config_IsErrorOccur = TRUE ;
131131 Config_dwErrorCode = ERROR_XENGINE_BLOGIC_CONFIG_JSON_XSTORAGE;
@@ -134,7 +134,6 @@ BOOL CConfig_Json::Config_Json_File(LPCTSTR lpszConfigFile,XENGINE_SERVERCONFIG
134134 Json::Value st_JsonXStorage = st_JsonRoot[" XStorage" ];
135135 pSt_ServerConfig->st_XStorage .nHashMode = st_JsonXStorage[" nHashMode" ].asInt ();
136136 pSt_ServerConfig->st_XStorage .bResumable = st_JsonXStorage[" bResumable" ].asInt ();
137- pSt_ServerConfig->st_XStorage .bRename = st_JsonXStorage[" bRename" ].asInt ();
138137 _tcscpy (pSt_ServerConfig->st_XStorage .tszFileDir , st_JsonXStorage[" tszFileDir" ].asCString ());
139138
140139 if (st_JsonRoot[" XProxy" ].empty () || (2 != st_JsonRoot[" XProxy" ].size ()))
@@ -183,16 +182,22 @@ BOOL CConfig_Json::Config_Json_File(LPCTSTR lpszConfigFile,XENGINE_SERVERCONFIG
183182 if (st_JsonRoot[" XCert" ].empty () || (6 != st_JsonRoot[" XCert" ].size ()))
184183 {
185184 Config_IsErrorOccur = TRUE ;
186- Config_dwErrorCode = ERROR_XENGINE_BLOGIC_CONFIG_JSON_P2XP ;
185+ Config_dwErrorCode = ERROR_XENGINE_BLOGIC_CONFIG_JSON_CERT ;
187186 return FALSE ;
188187 }
189188 Json::Value st_JsonCert = st_JsonRoot[" XCert" ];
190189 pSt_ServerConfig->st_XCert .bDLEnable = st_JsonCert[" bDLEnable" ].asInt ();
191190 pSt_ServerConfig->st_XCert .bUPEnable = st_JsonCert[" bUPEnable" ].asInt ();
192191 pSt_ServerConfig->st_XCert .bCHEnable = st_JsonCert[" bCHEnable" ].asInt ();
193192 pSt_ServerConfig->st_XCert .nSslType = st_JsonCert[" nSslType" ].asInt ();
194- _tcscpy (pSt_ServerConfig->st_XCert .tszCertChain , st_JsonP2xp[" tszCertChain" ].asCString ());
195- _tcscpy (pSt_ServerConfig->st_XCert .tszCertKey , st_JsonP2xp[" tszCertKey" ].asCString ());
193+ if (!st_JsonP2xp[" tszCertChain" ].isNull ())
194+ {
195+ _tcscpy (pSt_ServerConfig->st_XCert .tszCertChain , st_JsonP2xp[" tszCertChain" ].asCString ());
196+ }
197+ if (!st_JsonP2xp[" tszCertKey" ].isNull ())
198+ {
199+ _tcscpy (pSt_ServerConfig->st_XCert .tszCertKey , st_JsonP2xp[" tszCertKey" ].asCString ());
200+ }
196201
197202 if (st_JsonRoot[" XVer" ].empty () || (1 != st_JsonRoot[" XVer" ].size ()))
198203 {
0 commit comments