OCT 1. 修复管理平台返回接口错误码判断不准确问题

This commit is contained in:
黄昕 2023-08-24 09:24:14 +08:00
parent 29b37d4a5d
commit c2153fd024
1 changed files with 3 additions and 2 deletions

View File

@ -474,6 +474,7 @@ int GetUserClientConfigure(const TCHAR *pUserName, const TCHAR *pToken, PUSER_CL
PUSER_CLIENT_CONFIG pUserCfg = &pUser->cliConfig;
TCHAR userPath[MAX_PATH];
int ret;
TCHAR *pConvRet;
#if USER_REAL_PLATFORM
ProtocolRequest<ReqGetUserCfgParams> req;
@ -565,9 +566,9 @@ int GetUserClientConfigure(const TCHAR *pUserName, const TCHAR *pToken, PUSER_CL
return ret;
}
ret = strtol(rsp.code.c_str(), nullptr, 10);
ret = strtol(rsp.code.c_str(), &pConvRet, 10);
if (ret != 0) {
if (ret != 0 || lstrlen(pConvRet) > 0) {
SPDLOG_ERROR(TEXT("Server response error code: {0}"), ret);
return -ERR_HTTP_SERVER_RSP;
}