Skip to content

Commit

Permalink
Fix creation of datareader for content filter
Browse files Browse the repository at this point in the history
Signed-off-by: Ricardo González Moreno <[email protected]>
  • Loading branch information
richiware committed Jul 15, 2022
1 parent b2c61f4 commit 052b97e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions rmw_fastrtps_shared_cpp/src/rmw_subscription.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,11 @@ __rmw_subscription_set_content_filter(
RMW_SET_ERROR_MSG("create_datareader() could not create data reader");
return RMW_RET_ERROR;
}

// Initialize DataReader's StatusCondition to be notified when new data is available
info->data_reader_->get_statuscondition().set_enabled_statuses(
eprosima::fastdds::dds::StatusMask::data_available());

// lambda to delete datareader
auto cleanup_datareader = rcpputils::make_scope_exit(
[subscriber, info]()
Expand Down

0 comments on commit 052b97e

Please sign in to comment.