Skip to content

Commit 231aceb

Browse files
committed
fixed:maybe return error bucket when input mistake storage key
1 parent aa5720f commit 231aceb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

XEngine_Source/StorageModule_APIHelp/APIHelp_Distributed/APIHelp_Distributed.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ bool CAPIHelp_Distributed::APIHelp_Distributed_DLStorage(LPCXSTR lpszMsgBuffer,
195195
//获得对应存储
196196
for (auto stl_ListIterator = pStl_ListBucket->begin(); stl_ListIterator != pStl_ListBucket->end(); stl_ListIterator++)
197197
{
198-
if (0 == _tcsxncmp(tszKeyStr, stl_ListIterator->tszBuckKey, _tcsxlen(tszKeyStr)))
198+
if (0 == _tcsxncmp(tszKeyStr, stl_ListIterator->tszBuckKey, _tcsxlen(stl_ListIterator->tszBuckKey)))
199199
{
200200
bFound = true;
201201
*pSt_StorageBucket = *stl_ListIterator;
@@ -248,7 +248,7 @@ bool CAPIHelp_Distributed::APIHelp_Distributed_CTStorage(LPCXSTR lpszMsgBuffer,
248248
//获得对应存储
249249
for (auto stl_ListIterator = pStl_ListBucket->begin(); stl_ListIterator != pStl_ListBucket->end(); stl_ListIterator++)
250250
{
251-
if (0 == _tcsxncmp(lpszMsgBuffer, stl_ListIterator->tszBuckKey, _tcsxlen(lpszMsgBuffer)))
251+
if (0 == _tcsxncmp(lpszMsgBuffer, stl_ListIterator->tszBuckKey, _tcsxlen(stl_ListIterator->tszBuckKey)))
252252
{
253253
bFound = true;
254254
*pSt_StorageBucket = *stl_ListIterator;
@@ -303,7 +303,7 @@ bool CAPIHelp_Distributed::APIHelp_Distributed_UPStorage(list<XENGINE_STORAGEBUC
303303
list<XENGINE_STORAGEBUCKET>::const_iterator stl_ListIterator = pStl_ListBucket->begin();
304304
for (; stl_ListIterator != pStl_ListBucket->end(); stl_ListIterator++)
305305
{
306-
if (0 == _tcsxnicmp(pSt_StorageBucket->tszBuckKey, stl_ListIterator->tszBuckKey, _tcsxlen(pSt_StorageBucket->tszBuckKey)))
306+
if (0 == _tcsxnicmp(pSt_StorageBucket->tszBuckKey, stl_ListIterator->tszBuckKey, _tcsxlen(stl_ListIterator->tszBuckKey)))
307307
{
308308
bFound = true;
309309
*pSt_StorageBucket = *stl_ListIterator;
@@ -455,7 +455,7 @@ bool CAPIHelp_Distributed::APIHelp_Distributed_GetPathKey(list<XENGINE_STORAGEBU
455455
bool bFound = false;
456456
for (auto stl_ListIterator = pStl_ListBucket->begin(); stl_ListIterator != pStl_ListBucket->end(); stl_ListIterator++)
457457
{
458-
if (0 == _tcsxncmp(lpszBuckKey, stl_ListIterator->tszBuckKey, _tcsxlen(lpszBuckKey)))
458+
if (0 == _tcsxncmp(lpszBuckKey, stl_ListIterator->tszBuckKey, _tcsxlen(stl_ListIterator->tszBuckKey)))
459459
{
460460
_tcsxcpy(ptszFilePath, stl_ListIterator->tszFilePath);
461461
bFound = true;

0 commit comments

Comments
 (0)