From 101e889f727e6c86bb6584425d9c5435fded7b92 Mon Sep 17 00:00:00 2001 From: Chris Lalancette Date: Thu, 11 Jul 2024 16:32:59 -0400 Subject: [PATCH] Fix the triggering of guard conditions. (#504) When a guard condition goes active, we have to remember to increase the trig_idx so we look at the next trigger. Otherwise, we can get into situations where we skip a triggered member. Signed-off-by: Chris Lalancette (cherry picked from commit 899bbdf73fb57c8f5926b31e9570f017b8c2fdb9) --- rmw_cyclonedds_cpp/src/rmw_node.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/rmw_cyclonedds_cpp/src/rmw_node.cpp b/rmw_cyclonedds_cpp/src/rmw_node.cpp index 240a4d98..74692484 100644 --- a/rmw_cyclonedds_cpp/src/rmw_node.cpp +++ b/rmw_cyclonedds_cpp/src/rmw_node.cpp @@ -4492,6 +4492,7 @@ extern "C" rmw_ret_t rmw_wait( if (ws->trigs[trig_idx] == static_cast(nelems)) { bool dummy; dds_take_guardcondition(x->gcondh, &dummy); + trig_idx++; } else { gcs->guard_conditions[i] = nullptr; }