|
@@ -349,8 +349,9 @@ bool CSATClient::TCPLogin(std::string strUserName, std::string strPassword, BOOL
|
|
pData->header.len = len;
|
|
pData->header.len = len;
|
|
pData->header.cmd = bLogin ? SATProtocol::CMD_LOGIN : SATProtocol::CMD_LOGOUT;
|
|
pData->header.cmd = bLogin ? SATProtocol::CMD_LOGIN : SATProtocol::CMD_LOGOUT;
|
|
|
|
|
|
- memcpy(pData->buf, strUserName.c_str(), strUserName.size());
|
|
|
|
- memcpy(pData->buf + MAX_PATH, strPassword.c_str(), strPassword.size());
|
|
|
|
|
|
+ SATProtocol::UserInfo* pUserInfo = (SATProtocol::UserInfo*)pData->buf;
|
|
|
|
+ memcpy(pUserInfo->szUserName, strUserName.c_str(), strUserName.size());
|
|
|
|
+ memcpy(pUserInfo->szPassword, strPassword.c_str(), strPassword.size());
|
|
|
|
|
|
bool bret = OnSend(pbuff, len);
|
|
bool bret = OnSend(pbuff, len);
|
|
delete[]pbuff;
|
|
delete[]pbuff;
|