Skip to content

Commit

Permalink
Copy recorder QoS profile to local variable so that temporary value i…
Browse files Browse the repository at this point in the history
…sn't cleared (#803) (#1335)

Co-authored-by: Emerson Knapp <[email protected]>
Signed-off-by: Michael Orlov <[email protected]>
(cherry picked from commit 8234765)

Co-authored-by: Michael Orlov <[email protected]>
  • Loading branch information
mergify[bot] and morlov-apexai authored May 16, 2023
1 parent 6ccbd20 commit 9e001ec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rosbag2_transport/src/rosbag2_transport/recorder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,8 @@ void Recorder::warn_if_new_qos_for_subscribed_topic(const std::string & topic_na
// Already warned about this topic
return;
}
const auto & used_profile = existing_subscription->second->qos_profile().get_rmw_qos_profile();
const auto actual_qos = existing_subscription->second->get_actual_qos();
const auto & used_profile = actual_qos.get_rmw_qos_profile();
auto publishers_info = node_->get_publishers_info_by_topic(topic_name);
for (const auto & info : publishers_info) {
auto new_profile = info.qos_profile().get_rmw_qos_profile();
Expand Down

0 comments on commit 9e001ec

Please sign in to comment.