Skip to content

Commit

Permalink
Refs #21044. Fix statistics tests and other things
Browse files Browse the repository at this point in the history
Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>
  • Loading branch information
richiware committed Jun 4, 2024
1 parent 98b62fb commit 01622c5
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ if(MSVC OR MSVC_IDE)
endif()
else()
set(CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} -Wall -pedantic -Wextra -Wno-unknown-pragmas -Wno-error=deprecated-declarations -Wno-switch-bool")
"${CMAKE_CXX_FLAGS} -Wall -pedantic -Wextra -Wno-unknown-pragmas -Wno-error=deprecated-declarations -Wno-switch-bool ${EPROSIMA_EXTRA_CMAKE_CXX_FLAGS}")
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-psabi")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class ITypeObjectRegistry
* @param[in] type_object Related TypeObject being registered.
* @param[inout] type_ids Returns the registered @ref TypeIdentifier.
* @ref TypeIdentifierPair::type_identifier1 might be TK_NONE.
* In other case this function will check it is consistence with the provided @TypeObject.
* In other case this function will check it is consistence with the provided @ref TypeObject.
* @return ReturnCode_t RETCODE_OK if correctly registered.
* RETCODE_PRECONDITION_NOT_MET if the discriminators differ.
* RETCODE_PRECONDITION_NOT_MET if the TypeIdentifier is not consistent with the given
Expand Down
2 changes: 1 addition & 1 deletion src/cpp/fastdds/publisher/DataWriterImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1650,7 +1650,7 @@ fastrtps::TopicAttributes DataWriterImpl::get_topic_attributes(
topic_att.topicName = topic.get_name();
topic_att.topicDataType = topic.get_type_name();
topic_att.topicKind = type->m_isGetKeyDefined ? WITH_KEY : NO_KEY;
if (xtypes::TK_NONE != type->type_identifiers().type_identifier1()._d())
if (type->auto_fill_type_information() && xtypes::TK_NONE != type->type_identifiers().type_identifier1()._d())
{
if (RETCODE_OK ==
fastrtps::rtps::RTPSDomainImpl::get_instance()->type_object_registry_observer().get_type_information(
Expand Down
2 changes: 1 addition & 1 deletion src/cpp/fastdds/subscriber/DataReaderImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1773,7 +1773,7 @@ fastrtps::TopicAttributes DataReaderImpl::topic_attributes() const
topic_att.topicDataType = topic_->get_type_name();
topic_att.historyQos = qos_.history();
topic_att.resourceLimitsQos = qos_.resource_limits();
if (xtypes::TK_NONE != type_->type_identifiers().type_identifier1()._d())
if (type_->auto_fill_type_information() && xtypes::TK_NONE != type_->type_identifiers().type_identifier1()._d())
{
if (RETCODE_OK ==
fastrtps::rtps::RTPSDomainImpl::get_instance()->type_object_registry_observer().get_type_information(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ TEST_F(StatisticsDomainParticipantMockTests, DisableStatisticsDataWriterFailureD
#ifdef FASTDDS_STATISTICS
eprosima::fastdds::dds::TypeSupport null_type(nullptr);
eprosima::fastdds::dds::TypeSupport count_type(new EntityCountPubSubType);
count_type->register_type_object_representation();

// 1. Create DomainParticipant
eprosima::fastdds::dds::DomainParticipant* participant =
Expand Down

0 comments on commit 01622c5

Please sign in to comment.