File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
include/rmw_fastrtps_shared_cpp Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -102,15 +102,15 @@ class SubListener : public eprosima::fastrtps::SubscriberListener
102102 }
103103
104104 void
105- data_taken ()
105+ data_taken (eprosima::fastrtps::Subscriber * sub )
106106 {
107107 std::lock_guard<std::mutex> lock (internalMutex_);
108108
109109 if (conditionMutex_ != nullptr ) {
110110 std::unique_lock<std::mutex> clock (*conditionMutex_);
111- -- data_;
111+ data_ = sub-> getUnreadCount () ;
112112 } else {
113- -- data_;
113+ data_ = sub-> getUnreadCount () ;
114114 }
115115 }
116116
Original file line number Diff line number Diff line change 6767 data.is_cdr_buffer = false ;
6868 data.data = ros_message;
6969 if (info->subscriber_ ->takeNextData (&data, &sinfo)) {
70- info->listener_ ->data_taken ();
70+ info->listener_ ->data_taken (info-> subscriber_ );
7171
7272 if (eprosima::fastrtps::rtps::ALIVE == sinfo.sampleKind ) {
7373 if (message_info) {
@@ -140,7 +140,7 @@ _take_serialized_message(
140140 data.is_cdr_buffer = true ;
141141 data.data = &buffer;
142142 if (info->subscriber_ ->takeNextData (&data, &sinfo)) {
143- info->listener_ ->data_taken ();
143+ info->listener_ ->data_taken (info-> subscriber_ );
144144
145145 if (eprosima::fastrtps::rtps::ALIVE == sinfo.sampleKind ) {
146146 auto buffer_size = static_cast <size_t >(buffer.getBufferSize ());
You can’t perform that action at this time.
0 commit comments