Skip to content

Commit

Permalink
allow builtin reader/writer to reallocate memory if needed (#221)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikaelarguedas authored Jul 31, 2018
1 parent 7148117 commit d179465
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions rmw_fastrtps_shared_cpp/src/rmw_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,12 @@ __rmw_create_node(
participantAttrs.rtps.builtin.domainId = static_cast<uint32_t>(domain_id);
// since the participant name is not part of the DDS spec
participantAttrs.rtps.setName(name);

// allow reallocation to support discovery messages bigger than 5000 bytes
participantAttrs.rtps.builtin.readerHistoryMemoryPolicy =
eprosima::fastrtps::rtps::PREALLOCATED_WITH_REALLOC_MEMORY_MODE;
participantAttrs.rtps.builtin.writerHistoryMemoryPolicy =
eprosima::fastrtps::rtps::PREALLOCATED_WITH_REALLOC_MEMORY_MODE;
// the node name is also set in the user_data
size_t name_length = strlen(name);
const char prefix[6] = "name=";
Expand Down

0 comments on commit d179465

Please sign in to comment.