From 63fc8ea81db6598f25aa39506027e8c41e5ee210 Mon Sep 17 00:00:00 2001 From: Balazs Racz Date: Tue, 20 Aug 2024 23:23:10 +0200 Subject: [PATCH] Fixes bug around reserved but unused aliases incorrectly generating an AMR frame upon conflict. --- src/openlcb/IfCan.cxx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/openlcb/IfCan.cxx b/src/openlcb/IfCan.cxx index c3b2a8352..3e10b7446 100644 --- a/src/openlcb/IfCan.cxx +++ b/src/openlcb/IfCan.cxx @@ -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. @@ -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(); }