主连接显示令牌消息时,不用显示远程地址

This commit is contained in:
Stone 2016-06-07 03:24:01 +00:00
parent 1440001c55
commit fc336a249c
2 changed files with 4 additions and 10 deletions

View File

@ -70,7 +70,7 @@ void TokenClient::Open()
Hello.Name = Cfg->User();*/
// 令牌客户端定时任务
_task = Sys.AddTask(LoopTask, this, 1000, 5000, "令牌客户");
_task = Sys.AddTask(LoopTask, this, 1000, 5000, "令牌客户");
Sys.AddTask(BroadcastHelloTask, this, 2000, 30000, "令牌广播");
}

View File

@ -322,17 +322,11 @@ void TokenController::ShowMessage(cstring action, const Message& msg)
debug_printf("Token::%s ", action);
if (ShowRemote || msg.State)
if (ShowRemote && msg.State)
{
//auto svr = (IPEndPoint*)Server;
auto svr = (IPEndPoint*)msg.State;
if(!svr) svr = (IPEndPoint*)Server;
//if (!svr || svr->Address == IPAddress::Broadcast())
if(svr)
{
svr->Show();
debug_printf(" ");
}
svr->Show();
debug_printf(" ");
}
msg.Show();