Skip to content

Commit

Permalink
Revert changes on rmw_event.cpp
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
  • Loading branch information
MiguelCompany committed Apr 10, 2023
1 parent f61b864 commit 6a9caae
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions rmw_fastrtps_shared_cpp/src/rmw_event.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,18 +142,10 @@ __rmw_init_event(
rmw_event->data = data;
rmw_event->event_type = event_type;
CustomEventInfo * event = static_cast<CustomEventInfo *>(rmw_event->data);

// For matched events, we always notify the waitset with the guard condition,
// so we will not enable them on the status condition.
bool is_matched_event =
(RMW_EVENT_PUBLICATION_MATCHED == event_type) ||
(RMW_EVENT_SUBSCRIPTION_MATCHED == event_type);
if (!is_matched_event) {
eprosima::fastdds::dds::StatusMask status_mask =
event->get_listener()->get_statuscondition().get_enabled_statuses();
status_mask |= rmw_fastrtps_shared_cpp::internal::rmw_event_to_dds_statusmask(event_type);
event->get_listener()->get_statuscondition().set_enabled_statuses(status_mask);
}
eprosima::fastdds::dds::StatusMask status_mask =
event->get_listener()->get_statuscondition().get_enabled_statuses();
status_mask |= rmw_fastrtps_shared_cpp::internal::rmw_event_to_dds_statusmask(event_type);
event->get_listener()->get_statuscondition().set_enabled_statuses(status_mask);

return RMW_RET_OK;
}
Expand Down

0 comments on commit 6a9caae

Please sign in to comment.