Skip to content

Commit

Permalink
Fix 'is_fixed_size' for ROS 2 services (ros2#76)
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Hoinkis <[email protected]>
  • Loading branch information
mossmaurice committed Jan 5, 2023
1 parent 146ada8 commit 7db68cb
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -232,12 +232,12 @@ bool iceoryx_is_fixed_size(const rosidl_service_type_support_t * type_supports)

if (ts.first == TypeSupportLanguage::CPP) {
auto members =
static_cast<const rosidl_typesupport_introspection_cpp::MessageMembers *>(ts.second->data);
return details_cpp::is_fixed_size(members);
static_cast<const rosidl_typesupport_introspection_cpp::ServiceMembers *>(ts.second->data);
return details_cpp::is_fixed_size(members->request_members_) && details_cpp::is_fixed_size(members->response_members_);
} else if (ts.first == TypeSupportLanguage::C) {
auto members =
static_cast<const rosidl_typesupport_introspection_c__MessageMembers *>(ts.second->data);
return details_c::is_fixed_size(members);
static_cast<const rosidl_typesupport_introspection_c__ServiceMembers *>(ts.second->data);
return details_c::is_fixed_size(members->request_members_) && details_c::is_fixed_size(members->response_members_);
}
// Something went wrong
return false;
Expand Down

0 comments on commit 7db68cb

Please sign in to comment.