Skip to content

Commit

Permalink
Fixes bug around reserved but unused aliases incorrectly generating
Browse files Browse the repository at this point in the history
an AMR frame upon conflict.
  • Loading branch information
balazsracz committed Aug 20, 2024
1 parent 0c62022 commit 63fc8ea
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/openlcb/IfCan.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@ class AliasConflictHandler : public CanFrameStateFlow
}

/// Sends an AMR (alias mapping release) frame with the alias alias_ and
/// the loca node ID that we have for it. Then deletes the mapping from the
/// local node table.
/// the local node ID that we have for it. Then deletes the mapping from
/// the local node table.
///
/// This is done in response to an alias conflict seen from the bus with
/// the given alias.
Expand All @@ -190,10 +190,9 @@ class AliasConflictHandler : public CanFrameStateFlow
alias_ ? if_can()->local_aliases()->lookup(NodeAlias(alias_)) : 0;
// Actually purge the table entry.
if_can()->local_aliases()->remove(alias_);
if (!node)
if (!node || CanDefs::is_reserved_alias_node_id(node))
{
LOG(INFO, "No node ID for AMR.");
// Did not find the node ID to use for alias release.
// We do not have a node ID to use for alias release.
return exit();
}

Expand Down

0 comments on commit 63fc8ea

Please sign in to comment.