注册完成不必清空密码

This commit is contained in:
Stone 2016-06-04 03:24:54 +00:00
parent 342d9c570d
commit 33cd7f81fd
2 changed files with 4 additions and 4 deletions

View File

@ -395,7 +395,7 @@ void TokenClient::Register()
Send(msg); Send(msg);
} }
void TokenClient::OnRegister(TokenMessage& msg ,Controller* ctrl) void TokenClient::OnRegister(TokenMessage& msg, Controller* ctrl)
{ {
if(!msg.Reply) return; if(!msg.Reply) return;
@ -427,8 +427,8 @@ void TokenClient::OnRegister(TokenMessage& msg ,Controller* ctrl)
Status = 0; Status = 0;
auto ctrl2 = dynamic_cast<TokenController*>(ctrl); //auto ctrl2 = dynamic_cast<TokenController*>(ctrl);
if (ctrl2) ctrl2->Key.SetLength(0); //if (ctrl2) ctrl2->Key.SetLength(0);
Sys.SetTask(_task, true, 0); Sys.SetTask(_task, true, 0);
} }

View File

@ -239,7 +239,7 @@ bool TokenController::OnReceive(Message& msg)
} }
// 加解密。握手不加密,登录响应不加密 // 加解密。握手不加密,登录响应不加密
if (msg.Code != 0x01) if (msg.Code > 0x01)
{ {
Buffer bs(msg.Data, msg.Length + 2); Buffer bs(msg.Data, msg.Length + 2);
if (!Decrypt(bs, Key)) if (!Decrypt(bs, Key))