Skip to content

Commit b1e9fa7

Browse files
committed
fixed:download Distributed key parse error
fixed:upload Distributed statistics file size error
1 parent 7306edc commit b1e9fa7

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
@@ -178,14 +178,14 @@ BOOL CAPIHelp_Distributed::APIHelp_Distributed_DLStorage(LPCTSTR lpszMsgBuffer,
178178
TCHAR tszKeyStr[128];
179179
memset(tszKeyStr, '\0', sizeof(tszKeyStr));
180180
//获得key
181-
int i = 0;
181+
int i = 1;
182182
int nLen = _tcslen(lpszMsgBuffer);
183183
for (; i < nLen; i++)
184184
{
185185
if ('/' == lpszMsgBuffer[i])
186186
{
187187
bFound = TRUE;
188-
memcpy(tszKeyStr, lpszMsgBuffer, i);
188+
memcpy(tszKeyStr, lpszMsgBuffer + 1, i - 1);
189189
break;
190190
}
191191
}
@@ -260,7 +260,7 @@ BOOL CAPIHelp_Distributed::APIHelp_Distributed_UPStorage(list<XENGINE_STORAGEBUC
260260
for (int j = 0; j < nListCount; j++)
261261
{
262262
struct __stat64 st_FStat;
263-
_stat64(stl_ListIterator->tszFilePath, &st_FStat);
263+
_stat64(ppListFile[j], &st_FStat);
264264
nDirCount += st_FStat.st_size;
265265
}
266266
BaseLib_OperatorMemory_Free((XPPPMEM)&ppListFile, nListCount);
@@ -365,7 +365,7 @@ __int64u CAPIHelp_Distributed::APIHelp_Distributed_GetSize(LPCTSTR lpszMsgBuffer
365365
memset(tszSizeStr, '\0', sizeof(tszSizeStr));
366366
memset(tszUnitStr, '\0', sizeof(tszUnitStr));
367367
//分别得到数字和单位
368-
memcpy(tszSizeStr, lpszMsgBuffer - 2, _tcslen(lpszMsgBuffer) - 2);
368+
memcpy(tszSizeStr, lpszMsgBuffer, _tcslen(lpszMsgBuffer) - 2);
369369
BaseLib_OperatorString_GetLastString(lpszMsgBuffer, 2, tszUnitStr);
370370

371371
__int64u nllSize = _ttoi64(tszSizeStr);

0 commit comments

Comments
 (0)