@@ -337,22 +337,23 @@ bool XEngine_AuthorizeHTTP_User(XNETHANDLE xhToken, LPCXSTR lpszClientAddr, LPCX
337337 XLOG_PRINT (xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X (" HTTP客户端:%s,用户名:%s,获取时间失败,无法继续,错误:%lX" ), lpszClientAddr, st_UserAuth.tszUserName , DBModule_GetLastError ());
338338 return false ;
339339 }
340- nListCount = 1 ;
341- BaseLib_Memory_Malloc ((XPPPMEM)&ppSt_ListClient, 1 , sizeof (AUTHSESSION_NETCLIENT));
342- _tcsxcpy ((*ppSt_ListClient)[0 ].st_UserTable .st_UserInfo .tszUserName , st_UserTable.st_UserInfo .tszUserName );
343- _tcsxcpy ((*ppSt_ListClient)[0 ].tszLeftTime , st_UserTable.tszLeftTime );
344- (*ppSt_ListClient)[0 ].nLeftTime = _ttxoll (st_UserTable.tszLeftTime );
345- (*ppSt_ListClient)[0 ].st_UserTable .enDeviceType = st_UserTable.enDeviceType ;
346- (*ppSt_ListClient)[0 ].st_UserTable .enSerialType = st_UserTable.enSerialType ;
347340 }
348341 // 安全验证判断
349- if ((0 != _tcsxncmp (st_UserAuth.tszUserName , st_UserTable.st_UserInfo .tszUserName , _tcsxlen (st_UserTable.st_UserInfo .tszUserName ))) || (0 = = _tcsxncmp (st_UserAuth.tszUserPass , st_UserTable.st_UserInfo .tszUserPass , _tcsxlen (st_UserTable.st_UserInfo .tszUserPass ))))
342+ if ((0 != _tcsxncmp (st_UserAuth.tszUserName , st_UserTable.st_UserInfo .tszUserName , _tcsxlen (st_UserTable.st_UserInfo .tszUserName ))) && (0 ! = _tcsxncmp (st_UserAuth.tszUserPass , st_UserTable.st_UserInfo .tszUserPass , _tcsxlen (st_UserTable.st_UserInfo .tszUserPass ))))
350343 {
351344 Protocol_Packet_HttpComm (tszSDBuffer, &nSDLen, ERROR_AUTHORIZE_PROTOCOL_NOTMATCH, " user information is incorrent" );
352345 XEngine_Client_TaskSend (lpszClientAddr, tszSDBuffer, nSDLen, XENGINE_AUTH_APP_NETTYPE_HTTP);
353346 XLOG_PRINT (xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X (" HTTP客户端:%s,用户名:%s,获取时间失败,验证信息失败" ), lpszClientAddr, st_UserAuth.tszUserName );
354347 return false ;
355348 }
349+ nListCount = 1 ;
350+ BaseLib_Memory_Malloc ((XPPPMEM)&ppSt_ListClient, 1 , sizeof (AUTHSESSION_NETCLIENT));
351+ _tcsxcpy ((*ppSt_ListClient)[0 ].st_UserTable .st_UserInfo .tszUserName , st_UserTable.st_UserInfo .tszUserName );
352+ _tcsxcpy ((*ppSt_ListClient)[0 ].tszLeftTime , st_UserTable.tszLeftTime );
353+ (*ppSt_ListClient)[0 ].nLeftTime = _ttxoll (st_UserTable.tszLeftTime );
354+ (*ppSt_ListClient)[0 ].st_UserTable .enDeviceType = st_UserTable.enDeviceType ;
355+ (*ppSt_ListClient)[0 ].st_UserTable .enSerialType = st_UserTable.enSerialType ;
356+
356357 Protocol_Packet_UserTime (tszSDBuffer, &nSDLen, &ppSt_ListClient, nListCount);
357358 BaseLib_Memory_Free ((XPPPMEM)&ppSt_ListClient, nListCount);
358359 XEngine_Client_TaskSend (lpszClientAddr, tszSDBuffer, nSDLen, XENGINE_AUTH_APP_NETTYPE_HTTP);
0 commit comments