Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions src/cpp/rtps/participant/RTPSParticipantImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2604,7 +2604,7 @@ bool RTPSParticipantImpl::get_persistence_service(
const char* debug_label = (param.endpointKind == WRITER ? "writer" : "reader");

// Check if also support persistence with TRANSIENT_LOCAL.
DurabilityKind_t durability_red_line = get_persistence_durability_red_line(is_builtin);
DurabilityKind_t durability_red_line = get_persistence_durability_red_line(is_builtin, param);
if (param.durabilityKind >= durability_red_line)
{
if (param.persistence_guid == c_Guid_Unknown)
Expand Down Expand Up @@ -2849,18 +2849,26 @@ bool RTPSParticipantImpl::did_mutation_took_place_on_meta(
}

DurabilityKind_t RTPSParticipantImpl::get_persistence_durability_red_line(
bool is_builtin_endpoint)
bool is_builtin_endpoint,
const EndpointAttributes& endpoint_attr) const
{
DurabilityKind_t durability_red_line = TRANSIENT;
if (!is_builtin_endpoint)
{
std::string* persistence_support_transient_local_property = PropertyPolicyHelper::find_property(
const std::string* persistence_support_transient_local_property = PropertyPolicyHelper::find_property(
m_att.properties, "dds.persistence.also-support-transient-local");
if (nullptr != persistence_support_transient_local_property &&
0 == persistence_support_transient_local_property->compare("true"))
{
durability_red_line = TRANSIENT_LOCAL;
}
persistence_support_transient_local_property = PropertyPolicyHelper::find_property(
endpoint_attr.properties, "dds.persistence.also-support-transient-local");
if (nullptr != persistence_support_transient_local_property &&
0 == persistence_support_transient_local_property->compare("true"))
{
durability_red_line = TRANSIENT_LOCAL;
}
}

return durability_red_line;
Expand Down
3 changes: 2 additions & 1 deletion src/cpp/rtps/participant/RTPSParticipantImpl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,8 @@ class RTPSParticipantImpl
* Returns the Durability kind from which a endpoint is able to use the persistence service.
*/
DurabilityKind_t get_persistence_durability_red_line(
bool is_builtin_endpoint);
bool is_builtin_endpoint,
const EndpointAttributes& endpoint_attr) const;

/**
* Check if persistence is required and return persistence service from factory,
Expand Down