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 61d1f07 commit e9aac70
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 e9aac70

Please sign in to comment.