对于组网请求,可能无法根据目标ID查到设备,也就无法得到目标Mac地址,此时可以借助Current作为辅助手段

This commit is contained in:
nnhy 2015-12-16 16:03:20 +00:00
parent 3168abb1be
commit f2a8cecf38
1 changed files with 2 additions and 1 deletions

View File

@ -47,6 +47,7 @@ bool TinyServer::Send(Message& msg) const
//if(!msg.State) //if(!msg.State)
{ {
auto dv = FindDevice(((TinyMessage&)msg).Dest); auto dv = FindDevice(((TinyMessage&)msg).Dest);
if(!dv) dv = Current;
if(dv) msg.State = dv->Mac; if(dv) msg.State = dv->Mac;
} }