Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to new ReturnCode_t #74

Merged
merged 1 commit into from
Apr 5, 2024
Merged
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
2 changes: 1 addition & 1 deletion include/LateJoiner.h
Original file line number Diff line number Diff line change
@@ -437,7 +437,7 @@ void DelayedEndpointDestruction<ReaderWriter>::operator ()(

// and we removed the endpoint: Domain::removeDataWriter or Domain::removeDataReader
ret = (manager.*LateJoinerDataTraits<ReaderWriter>::remove_endpoint_function)(endpoint);
if (ReturnCode_t::RETCODE_OK != ret)
if (RETCODE_OK != ret)
{
LOG_ERROR("Error deleting Endpoint");
}
34 changes: 17 additions & 17 deletions src/DiscoveryServerManager.cpp
Original file line number Diff line number Diff line change
@@ -113,7 +113,7 @@ DiscoveryServerManager::DiscoveryServerManager(
tinyxml2::XMLPrinter printer;
profiles->Accept(&printer);
std::string xmlString = R"(")" + std::string(printer.CStr()) + R"(")";
if (ReturnCode_t::RETCODE_OK ==
if (RETCODE_OK ==
DomainParticipantFactory::get_instance()->load_XML_profiles_string(xmlString.c_str(),
std::string(printer.CStr()).length()))
{
@@ -427,7 +427,7 @@ ReturnCode_t DiscoveryServerManager::deleteDataReader(
{
if (dr == nullptr)
{
return ReturnCode_t::RETCODE_ERROR;
return RETCODE_ERROR;
}
fastdds::dds::Subscriber* sub = nullptr;
{
@@ -439,15 +439,15 @@ ReturnCode_t DiscoveryServerManager::deleteDataReader(
{
return sub->delete_datareader(dr);
}
return ReturnCode_t::RETCODE_ERROR;
return RETCODE_ERROR;
}

ReturnCode_t DiscoveryServerManager::deleteDataWriter(
DataWriter* dw)
{
if (dw == nullptr)
{
return ReturnCode_t::RETCODE_ERROR;
return RETCODE_ERROR;
}
fastdds::dds::Publisher* pub = nullptr;
{
@@ -459,7 +459,7 @@ ReturnCode_t DiscoveryServerManager::deleteDataWriter(
{
return pub->delete_datawriter(dw);
}
return ReturnCode_t::RETCODE_ERROR;
return RETCODE_ERROR;
}

ReturnCode_t DiscoveryServerManager::deleteParticipant(
@@ -468,7 +468,7 @@ ReturnCode_t DiscoveryServerManager::deleteParticipant(
{
if (participant == nullptr)
{
return ReturnCode_t::RETCODE_ERROR;
return RETCODE_ERROR;
}

std::lock_guard<std::recursive_mutex> lock(management_mutex);
@@ -477,7 +477,7 @@ ReturnCode_t DiscoveryServerManager::deleteParticipant(
entity_map.erase(participant->guid());

ReturnCode_t ret = participant->delete_contained_entities();
if (ret != ReturnCode_t::RETCODE_OK)
if (ret != RETCODE_OK)
{
LOG_ERROR("Error cleaning up participant entities");
}
@@ -704,13 +704,13 @@ void DiscoveryServerManager::onTerminate()
entity.second->set_listener(nullptr);

ReturnCode_t ret = entity.second->delete_contained_entities();
if (ReturnCode_t::RETCODE_OK != ret)
if (RETCODE_OK != ret)
{
LOG_ERROR("Error cleaning up client entities");
}

ret = DomainParticipantFactory::get_instance()->delete_participant(entity.second);
if (ReturnCode_t::RETCODE_OK != ret)
if (RETCODE_OK != ret)
{
LOG_ERROR("Error deleting Client");
}
@@ -723,13 +723,13 @@ void DiscoveryServerManager::onTerminate()
entity.second->set_listener(nullptr);

ReturnCode_t ret = entity.second->delete_contained_entities();
if (ReturnCode_t::RETCODE_OK != ret)
if (RETCODE_OK != ret)
{
LOG_ERROR("Error cleaning up simple entities");
}

ret = DomainParticipantFactory::get_instance()->delete_participant(entity.second);
if (ReturnCode_t::RETCODE_OK != ret)
if (RETCODE_OK != ret)
{
LOG_ERROR("Error deleting Simple Discovery Entity");
}
@@ -741,13 +741,13 @@ void DiscoveryServerManager::onTerminate()
entity.second->set_listener(nullptr);

ReturnCode_t ret = entity.second->delete_contained_entities();
if (ReturnCode_t::RETCODE_OK != ret)
if (RETCODE_OK != ret)
{
LOG_ERROR("Error cleaning up server entities");
}

ret = DomainParticipantFactory::get_instance()->delete_participant(entity.second);
if (ReturnCode_t::RETCODE_OK != ret)
if (RETCODE_OK != ret)
{
LOG_ERROR("Error deleting Server");
}
@@ -824,7 +824,7 @@ void DiscoveryServerManager::loadServer(

// retrieve profile attributes
DomainParticipantQos dpQOS;
if (ReturnCode_t::RETCODE_OK !=
if (RETCODE_OK !=
DomainParticipantFactory::get_instance()->get_participant_qos_from_profile(std::string(profile_name),
dpQOS))
{
@@ -996,7 +996,7 @@ void DiscoveryServerManager::loadClient(

// retrieve profile attributes
DomainParticipantQos dpQOS;
if (ReturnCode_t::RETCODE_OK !=
if (RETCODE_OK !=
DomainParticipantFactory::get_instance()->get_participant_qos_from_profile(std::string(profile_name),
dpQOS))
{
@@ -1270,7 +1270,7 @@ void DiscoveryServerManager::loadSimple(
if (profile_name != nullptr)
{
// retrieve profile attributes
if (ReturnCode_t::RETCODE_OK !=
if (RETCODE_OK !=
DomainParticipantFactory::get_instance()->get_participant_qos_from_profile(std::string(profile_name),
dpQOS))
{
@@ -1645,7 +1645,7 @@ void DiscoveryServerManager::MapServerInfo(
// I must load the prefix from the profile
// retrieve profile QOS
pqos = std::make_shared<DomainParticipantQos>();
if (ReturnCode_t::RETCODE_OK !=
if (RETCODE_OK !=
DomainParticipantFactory::get_instance()->get_participant_qos_from_profile(profile_name, *pqos))
{
LOG_ERROR("DiscoveryServerManager::loadServer couldn't load profile " << profile_name);
2 changes: 1 addition & 1 deletion src/LateJoiner.cpp
Original file line number Diff line number Diff line change
@@ -70,7 +70,7 @@ void DelayedParticipantDestruction::operator ()(
std::string name = p->get_qos().name().to_string();

ReturnCode_t ret = manager.deleteParticipant(p);
if (ReturnCode_t::RETCODE_OK != ret)
if (RETCODE_OK != ret)
{
LOG_ERROR("Error during delayed deletion of Participant");
}