Skip to content

Commit 769ea96

Browse files
committed
update:match xengine v8.10
1 parent b37ef2b commit 769ea96

File tree

26 files changed

+396
-396
lines changed

26 files changed

+396
-396
lines changed

XEngine_Source/StorageModule_APIHelp/APIHelp_Api/APIHelp_Api.cpp

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -63,21 +63,21 @@ BOOL CAPIHelp_Api::APIHelp_Api_ProxyAuth(TCHAR* ptszUser, TCHAR* ptszPass, TCHAR
6363
memset(tszAuthStr, '\0', MAX_PATH);
6464
memset(tszSDBuffer, '\0', sizeof(tszSDBuffer));
6565
//是否有验证信息
66-
if (!RfcComponents_HttpHelp_GetAuthInfo(&pptszListHdr, nHdrCount, tszAuthStr, &nAuthLen, &nAuthType))
66+
if (!HttpProtocol_ServerHelp_GetAuthInfo(&pptszListHdr, nHdrCount, tszAuthStr, &nAuthLen, &nAuthType))
6767
{
68-
APIHelp_IsErrorOccur = TRUE;
68+
APIHelp_IsErrorOccur = true;
6969
APIHelp_dwErrorCode = ERROR_STORAGE_MODULE_APIHELP_NOTAUTH;
7070
return FALSE;
7171
}
7272
//是否是BASIC
7373
if (1 != nAuthType)
7474
{
75-
APIHelp_IsErrorOccur = TRUE;
75+
APIHelp_IsErrorOccur = true;
7676
APIHelp_dwErrorCode = ERROR_STORAGE_MODULE_APIHELP_NOTSUPPORT;
7777
return FALSE;
7878
}
7979
OPenSsl_Help_BasicDecoder(tszAuthStr, ptszUser, ptszPass);
80-
return TRUE;
80+
return true;
8181
}
8282
/********************************************************************
8383
函数名称:APIHelp_Api_RangeFile
@@ -127,7 +127,7 @@ BOOL CAPIHelp_Api::APIHelp_Api_RangeFile(int* pInt_SPos, int* pInt_EPos, __int64
127127
memset(tszValueStr, '\0', sizeof(tszValueStr));
128128
memset(tszFieldStr, '\0', sizeof(tszFieldStr));
129129
//是否有范围
130-
if (RfcComponents_HttpHelp_GetField(&pptszListHdr, nHdrCount, lpszRangeStr, tszFieldStr))
130+
if (HttpProtocol_ServerHelp_GetField(&pptszListHdr, nHdrCount, lpszRangeStr, tszFieldStr))
131131
{
132132
//是否没有找到
133133
int nBPos = 0; //某些时候有个BYTE
@@ -137,7 +137,7 @@ BOOL CAPIHelp_Api::APIHelp_Api_RangeFile(int* pInt_SPos, int* pInt_EPos, __int64
137137
}
138138
if (!BaseLib_OperatorString_GetKeyValue(tszFieldStr + nBPos, "-", tszKeyStr, tszValueStr))
139139
{
140-
APIHelp_IsErrorOccur = TRUE;
140+
APIHelp_IsErrorOccur = true;
141141
APIHelp_dwErrorCode = ERROR_STORAGE_MODULE_APIHELP_PARSELEN;
142142
return FALSE;
143143
}
@@ -158,26 +158,26 @@ BOOL CAPIHelp_Api::APIHelp_Api_RangeFile(int* pInt_SPos, int* pInt_EPos, __int64
158158
*pInt_SPos = _ttoi(tszKeyStr);
159159
*pInt_EPos = _ttoi(tszValueStr);
160160
}
161-
bFound = TRUE;
161+
bFound = true;
162162
}
163163

164164
if (0 == *pInt_Count)
165165
{
166-
if (RfcComponents_HttpHelp_GetField(&pptszListHdr, nHdrCount, lpszLengthStr, tszFieldStr))
166+
if (HttpProtocol_ServerHelp_GetField(&pptszListHdr, nHdrCount, lpszLengthStr, tszFieldStr))
167167
{
168168
*pInt_Count = _ttoi64(tszFieldStr);
169-
bFound = TRUE;
169+
bFound = true;
170170
}
171171
}
172172

173173
if (!bFound)
174174
{
175-
APIHelp_IsErrorOccur = TRUE;
175+
APIHelp_IsErrorOccur = true;
176176
APIHelp_dwErrorCode = ERROR_STORAGE_MODULE_APIHELP_NOTLENGTH;
177177
return FALSE;
178178
}
179179

180-
return TRUE;
180+
return true;
181181
}
182182
/********************************************************************
183183
函数名称:APIHelp_Api_VerHash
@@ -210,19 +210,19 @@ BOOL CAPIHelp_Api::APIHelp_Api_VerHash(LPCTSTR lpszFileHash, TCHAR** pptszListHd
210210
TCHAR tszValueStr[MAX_PATH];
211211
memset(tszValueStr, '\0', MAX_PATH);
212212

213-
if (!RfcComponents_HttpHelp_GetField(&pptszListHdr, nHdrCount, lpszKeyStr, tszValueStr))
213+
if (!HttpProtocol_ServerHelp_GetField(&pptszListHdr, nHdrCount, lpszKeyStr, tszValueStr))
214214
{
215-
APIHelp_IsErrorOccur = TRUE;
215+
APIHelp_IsErrorOccur = true;
216216
APIHelp_dwErrorCode = ERROR_STORAGE_MODULE_APIHELP_NOTHASH;
217217
return FALSE;
218218
}
219219
if (0 != _tcsnicmp(lpszFileHash, tszValueStr, _tcslen(lpszFileHash)))
220220
{
221-
APIHelp_IsErrorOccur = TRUE;
221+
APIHelp_IsErrorOccur = true;
222222
APIHelp_dwErrorCode = ERROR_STORAGE_MODULE_APIHELP_NOTMATCH;
223223
return FALSE;
224224
}
225-
return TRUE;
225+
return true;
226226
}
227227
/********************************************************************
228228
函数名称:APIHelp_Api_GetIPInfo
@@ -258,14 +258,14 @@ BOOL CAPIHelp_Api::APIHelp_Api_GetIPInfo(LPCTSTR lpszMsgBuffer, int nMsgLen, XEN
258258
std::unique_ptr<Json::CharReader> const pSt_JsonReader(st_JsonBuilder.newCharReader());
259259
if (!pSt_JsonReader->parse(lpszMsgBuffer, lpszMsgBuffer + nMsgLen, &st_JsonRoot, &st_JsonError))
260260
{
261-
APIHelp_IsErrorOccur = TRUE;
261+
APIHelp_IsErrorOccur = true;
262262
APIHelp_dwErrorCode = ERROR_STORAGE_MODULE_APIHELP_PARSE;
263263
return FALSE;
264264
}
265265
//是否获取成功
266266
if (0 != st_JsonRoot["code"].asInt())
267267
{
268-
APIHelp_IsErrorOccur = TRUE;
268+
APIHelp_IsErrorOccur = true;
269269
APIHelp_dwErrorCode = ERROR_STORAGE_MODULE_APIHELP_CODE;
270270
return FALSE;
271271
}
@@ -282,7 +282,7 @@ BOOL CAPIHelp_Api::APIHelp_Api_GetIPInfo(LPCTSTR lpszMsgBuffer, int nMsgLen, XEN
282282
_tcscpy(pSt_IPAddrInfo->tszIPISP, st_JsonObject["tszIPISP"].asCString());
283283
_tcscpy(pSt_IPAddrInfo->tszIPTime, st_JsonObject["tszIPTime"].asCString());
284284

285-
return TRUE;
285+
return true;
286286
}
287287
/********************************************************************
288288
函数名称:APIHelp_Api_UrlParse
@@ -349,5 +349,5 @@ BOOL CAPIHelp_Api::APIHelp_Api_UrlParse(TCHAR*** ppptszList, int nListCount, TCH
349349
_tcscpy(ptszKeyName, tszValue);
350350
}
351351
}
352-
return TRUE;
352+
return true;
353353
}

XEngine_Source/StorageModule_APIHelp/APIHelp_Distributed/APIHelp_Distributed.cpp

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ BOOL CAPIHelp_Distributed::APIHelp_Distributed_RandomAddr(list<string>* pStl_Lis
5454

5555
if (!pStl_ListAddr->empty())
5656
{
57-
APIHelp_IsErrorOccur = TRUE;
57+
APIHelp_IsErrorOccur = true;
5858
APIHelp_dwErrorCode = ERROR_STORAGE_MODULE_APIHELP_PARAMENT;
5959
return FALSE;
6060
}
@@ -73,7 +73,7 @@ BOOL CAPIHelp_Distributed::APIHelp_Distributed_RandomAddr(list<string>* pStl_Lis
7373
{
7474
if (xhToken == i)
7575
{
76-
bFound = TRUE;
76+
bFound = true;
7777
_tcscpy(ptszAddr, stl_ListIterator->c_str());
7878
break;
7979
}
@@ -90,7 +90,7 @@ BOOL CAPIHelp_Distributed::APIHelp_Distributed_RandomAddr(list<string>* pStl_Lis
9090
{
9191
if (nRandomFront == i)
9292
{
93-
bFound = TRUE;
93+
bFound = true;
9494
_tcscpy(ptszAddr, stl_ListIterator->c_str());
9595
break;
9696
}
@@ -107,7 +107,7 @@ BOOL CAPIHelp_Distributed::APIHelp_Distributed_RandomAddr(list<string>* pStl_Lis
107107
{
108108
if (nRandomBack == i)
109109
{
110-
bFound = TRUE;
110+
bFound = true;
111111
_tcscpy(ptszAddr, stl_ListIterator->c_str());
112112
break;
113113
}
@@ -116,11 +116,11 @@ BOOL CAPIHelp_Distributed::APIHelp_Distributed_RandomAddr(list<string>* pStl_Lis
116116

117117
if (!bFound)
118118
{
119-
APIHelp_IsErrorOccur = TRUE;
119+
APIHelp_IsErrorOccur = true;
120120
APIHelp_dwErrorCode = ERROR_STORAGE_MODULE_APIHELP_NOTFOUND;
121121
return FALSE;
122122
}
123-
return TRUE;
123+
return true;
124124
}
125125
/********************************************************************
126126
函数名称:APIHelp_Distributed_FileList
@@ -151,7 +151,7 @@ BOOL CAPIHelp_Distributed::APIHelp_Distributed_FileList(list<APIHELP_LBFILEINFO>
151151

152152
if ((NULL == pStl_ListParse) || (NULL == pppSt_ListPacket))
153153
{
154-
APIHelp_IsErrorOccur = TRUE;
154+
APIHelp_IsErrorOccur = true;
155155
APIHelp_dwErrorCode = ERROR_STORAGE_MODULE_APIHELP_PARAMENT;
156156
return FALSE;
157157
}
@@ -163,7 +163,7 @@ BOOL CAPIHelp_Distributed::APIHelp_Distributed_FileList(list<APIHELP_LBFILEINFO>
163163
APIHelp_Distributed_FileListParse(stl_ListIterator->tszMsgBuffer, stl_ListIterator->nMsgLen, (*pppSt_ListPacket)[i]);
164164
}
165165
*pInt_ListCount = pStl_ListParse->size();
166-
return TRUE;
166+
return true;
167167
}
168168
/********************************************************************
169169
函数名称:APIHelp_Distributed_DLStorage
@@ -194,7 +194,7 @@ BOOL CAPIHelp_Distributed::APIHelp_Distributed_DLStorage(LPCTSTR lpszMsgBuffer,
194194

195195
if ((NULL == lpszMsgBuffer) || (NULL == pSt_StorageBucket))
196196
{
197-
APIHelp_IsErrorOccur = TRUE;
197+
APIHelp_IsErrorOccur = true;
198198
APIHelp_dwErrorCode = ERROR_STORAGE_MODULE_APIHELP_PARAMENT;
199199
return FALSE;
200200
}
@@ -208,14 +208,14 @@ BOOL CAPIHelp_Distributed::APIHelp_Distributed_DLStorage(LPCTSTR lpszMsgBuffer,
208208
{
209209
if ('/' == lpszMsgBuffer[i])
210210
{
211-
bFound = TRUE;
211+
bFound = true;
212212
memcpy(tszKeyStr, lpszMsgBuffer + 1, i - 1);
213213
break;
214214
}
215215
}
216216
if (!bFound)
217217
{
218-
APIHelp_IsErrorOccur = TRUE;
218+
APIHelp_IsErrorOccur = true;
219219
APIHelp_dwErrorCode = ERROR_STORAGE_MODULE_APIHELP_NOTFOUND;
220220
return FALSE;
221221
}
@@ -225,19 +225,19 @@ BOOL CAPIHelp_Distributed::APIHelp_Distributed_DLStorage(LPCTSTR lpszMsgBuffer,
225225
{
226226
if (0 == _tcsncmp(tszKeyStr, stl_ListIterator->tszBuckKey, _tcslen(tszKeyStr)))
227227
{
228-
bFound = TRUE;
228+
bFound = true;
229229
*pSt_StorageBucket = *stl_ListIterator;
230230
break;
231231
}
232232
}
233233
if (!bFound)
234234
{
235-
APIHelp_IsErrorOccur = TRUE;
235+
APIHelp_IsErrorOccur = true;
236236
APIHelp_dwErrorCode = ERROR_STORAGE_MODULE_APIHELP_NOTFOUND;
237237
return FALSE;
238238
}
239239
_tcscpy(pSt_StorageBucket->tszFileName, lpszMsgBuffer + i);
240-
return TRUE;
240+
return true;
241241
}
242242
/********************************************************************
243243
函数名称:APIHelp_Distributed_UPStorage
@@ -268,7 +268,7 @@ BOOL CAPIHelp_Distributed::APIHelp_Distributed_UPStorage(list<XENGINE_STORAGEBUC
268268

269269
if ((NULL == pStl_ListBucket) || (NULL == pSt_StorageBucket))
270270
{
271-
APIHelp_IsErrorOccur = TRUE;
271+
APIHelp_IsErrorOccur = true;
272272
APIHelp_dwErrorCode = ERROR_STORAGE_MODULE_APIHELP_PARAMENT;
273273
return FALSE;
274274
}
@@ -281,14 +281,14 @@ BOOL CAPIHelp_Distributed::APIHelp_Distributed_UPStorage(list<XENGINE_STORAGEBUC
281281
{
282282
if (0 == _tcsnicmp(pSt_StorageBucket->tszBuckKey, stl_ListIterator->tszBuckKey, _tcslen(pSt_StorageBucket->tszBuckKey)))
283283
{
284-
bFound = TRUE;
284+
bFound = true;
285285
*pSt_StorageBucket = *stl_ListIterator;
286286
break;
287287
}
288288
}
289289
if (!bFound)
290290
{
291-
APIHelp_IsErrorOccur = TRUE;
291+
APIHelp_IsErrorOccur = true;
292292
APIHelp_dwErrorCode = ERROR_STORAGE_MODULE_APIHELP_NOTFOUND;
293293
return FALSE;
294294
}
@@ -340,7 +340,7 @@ BOOL CAPIHelp_Distributed::APIHelp_Distributed_UPStorage(list<XENGINE_STORAGEBUC
340340
_tcscat(tszFilePath, _T("/*"));
341341
}
342342
}
343-
SystemApi_File_EnumFile(tszFilePath, &ppListFile, &nListCount, NULL, NULL, TRUE, 1);
343+
SystemApi_File_EnumFile(tszFilePath, &ppListFile, &nListCount, NULL, NULL, true, 1);
344344
for (int j = 0; j < nListCount; j++)
345345
{
346346
struct _tstat64 st_FStat;
@@ -360,7 +360,7 @@ BOOL CAPIHelp_Distributed::APIHelp_Distributed_UPStorage(list<XENGINE_STORAGEBUC
360360
//通过指定模式获得一个key
361361
if (stl_BuckSelect.empty())
362362
{
363-
APIHelp_IsErrorOccur = TRUE;
363+
APIHelp_IsErrorOccur = true;
364364
APIHelp_dwErrorCode = ERROR_STORAGE_MODULE_APIHELP_NOTFOUND;
365365
return FALSE;
366366
}
@@ -379,7 +379,7 @@ BOOL CAPIHelp_Distributed::APIHelp_Distributed_UPStorage(list<XENGINE_STORAGEBUC
379379
{
380380
if (xhToken == i)
381381
{
382-
bFound = TRUE;
382+
bFound = true;
383383
*pSt_StorageBucket = *stl_ListIterator;
384384
break;
385385
}
@@ -396,7 +396,7 @@ BOOL CAPIHelp_Distributed::APIHelp_Distributed_UPStorage(list<XENGINE_STORAGEBUC
396396
{
397397
if (nUPFront == i)
398398
{
399-
bFound = TRUE;
399+
bFound = true;
400400
*pSt_StorageBucket = *stl_ListIterator;
401401
break;
402402
}
@@ -413,7 +413,7 @@ BOOL CAPIHelp_Distributed::APIHelp_Distributed_UPStorage(list<XENGINE_STORAGEBUC
413413
{
414414
if (nUPBack == i)
415415
{
416-
bFound = TRUE;
416+
bFound = true;
417417
*pSt_StorageBucket = *stl_ListIterator;
418418
break;
419419
}
@@ -422,13 +422,13 @@ BOOL CAPIHelp_Distributed::APIHelp_Distributed_UPStorage(list<XENGINE_STORAGEBUC
422422

423423
if (!bFound)
424424
{
425-
APIHelp_IsErrorOccur = TRUE;
425+
APIHelp_IsErrorOccur = true;
426426
APIHelp_dwErrorCode = ERROR_STORAGE_MODULE_APIHELP_NOTFOUND;
427427
return FALSE;
428428
}
429429
}
430430

431-
return TRUE;
431+
return true;
432432
}
433433
/********************************************************************
434434
函数名称:APIHelp_Distributed_GetPathKey
@@ -459,7 +459,7 @@ BOOL CAPIHelp_Distributed::APIHelp_Distributed_GetPathKey(list<XENGINE_STORAGEBU
459459

460460
if ((NULL == pStl_ListBucket) || (NULL == lpszBuckKey) || (NULL == ptszFilePath))
461461
{
462-
APIHelp_IsErrorOccur = TRUE;
462+
APIHelp_IsErrorOccur = true;
463463
APIHelp_dwErrorCode = ERROR_STORAGE_MODULE_APIHELP_PARAMENT;
464464
return FALSE;
465465
}
@@ -469,17 +469,17 @@ BOOL CAPIHelp_Distributed::APIHelp_Distributed_GetPathKey(list<XENGINE_STORAGEBU
469469
if (0 == _tcsncmp(lpszBuckKey, stl_ListIterator->tszBuckKey, _tcslen(lpszBuckKey)))
470470
{
471471
_tcscpy(ptszFilePath, stl_ListIterator->tszFilePath);
472-
bFound = TRUE;
472+
bFound = true;
473473
break;
474474
}
475475
}
476476
if (!bFound)
477477
{
478-
APIHelp_IsErrorOccur = TRUE;
478+
APIHelp_IsErrorOccur = true;
479479
APIHelp_dwErrorCode = ERROR_STORAGE_MODULE_APIHELP_NOTFOUND;
480480
return FALSE;
481481
}
482-
return TRUE;
482+
return true;
483483
}
484484
//////////////////////////////////////////////////////////////////////////
485485
// 保护函数
@@ -518,7 +518,7 @@ BOOL CAPIHelp_Distributed::APIHelp_Distributed_FileListParse(LPCTSTR lpszMsgBuff
518518
std::unique_ptr<Json::CharReader> const pSt_JsonReader(st_JsonBuilder.newCharReader());
519519
if (!pSt_JsonReader->parse(lpszMsgBuffer, lpszMsgBuffer + nMsgLen, &st_JsonRoot, &st_JsonError))
520520
{
521-
APIHelp_IsErrorOccur = TRUE;
521+
APIHelp_IsErrorOccur = true;
522522
APIHelp_dwErrorCode = ERROR_STORAGE_MODULE_APIHELP_PARSE;
523523
return FALSE;
524524
}
@@ -539,7 +539,7 @@ BOOL CAPIHelp_Distributed::APIHelp_Distributed_FileListParse(LPCTSTR lpszMsgBuff
539539

540540
break;
541541
}
542-
return TRUE;
542+
return true;
543543
}
544544
/********************************************************************
545545
函数名称:APIHelp_Distributed_GetSize

XEngine_Source/StorageModule_APIHelp/dllmain.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ BOOL APIENTRY DllMain( HMODULE hModule,
1414
case DLL_PROCESS_DETACH:
1515
break;
1616
}
17-
return TRUE;
17+
return true;
1818
}
1919

0 commit comments

Comments
 (0)