libuavcan: Proper passive mode handling

This commit is contained in:
Pavel Kirienko
2014-07-15 01:03:41 +04:00
parent abaaf8d440
commit c31d41c9c8
3 changed files with 10 additions and 2 deletions
+2 -1
View File
@@ -319,9 +319,10 @@ bool Dispatcher::hasServer(DataTypeID dtid) const
bool Dispatcher::setNodeID(NodeID nid)
{
if (nid.isUnicast() && !self_node_id_.isValid())
if (!self_node_id_is_set_)
{
self_node_id_ = nid;
self_node_id_is_set_ = true;
return true;
}
return false;