Skip to content

Commit 525c446

Browse files
committed
fixed:not parse speed limit for upload
1 parent 13fedca commit 525c446

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

XEngine_Source/XEngine_StorageApp/StorageApp_UPLoader.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ XHTHREAD CALLBACK XEngine_UPLoader_HTTPThread(XPVOID lParam)
4242
bool XEngine_Task_HttpUPLoader(LPCXSTR lpszClientAddr, LPCXSTR lpszMsgBuffer, int nMsgLen, RFCCOMPONENTS_HTTP_REQPARAM* pSt_HTTPParam, XCHAR** pptszListHdr, int nHdrCount)
4343
{
4444
int nSDLen = 2048;
45+
int nLimit = 0;
4546
XCHAR tszSDBuffer[2048];
4647
XCHAR tszFileDir[1024];
4748
RFCCOMPONENTS_HTTP_HDRPARAM st_HDRParam;
@@ -96,6 +97,7 @@ bool XEngine_Task_HttpUPLoader(LPCXSTR lpszClientAddr, LPCXSTR lpszMsgBuffer, in
9697
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("上传客户端:%s,用户验证失败,错误:%lX"), lpszClientAddr, StorageHelp_GetLastError());
9798
return false;
9899
}
100+
int nCode = 0;
99101
int nResponseCode = 0;
100102
XCHAR* ptszBody = NULL;
101103

@@ -111,6 +113,7 @@ bool XEngine_Task_HttpUPLoader(LPCXSTR lpszClientAddr, LPCXSTR lpszMsgBuffer, in
111113
XEngine_Net_SendMsg(lpszClientAddr, tszSDBuffer, nSDLen, STORAGE_NETTYPE_HTTPUPLOADER);
112114
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("上传客户端:%s,用户验证失败,用户名:%s,密码:%s,错误码:%d,错误内容:%s"), tszUserName, tszUserPass, tszUserPass, nResponseCode, ptszBody);
113115
}
116+
Protocol_StorageParse_SpeedLimit(ptszBody, nSDLen, &nCode, &nLimit);
114117
BaseLib_OperatorMemory_FreeCStyle((VOID**)&ptszBody);
115118
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("上传客户端:%s,代理服务:%s 验证通过,用户名:%s,密码:%s"), lpszClientAddr, st_ServiceCfg.st_XProxy.tszAuthPass, tszUserName, tszUserPass);
116119
st_HDRParam.bAuth = true;

0 commit comments

Comments
 (0)