Skip to content

Commit

Permalink
Change Errors to Warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
iguessthislldo committed Jul 24, 2024
1 parent b578a4c commit 0bc9a99
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions dds/DCPS/transport/rtps_udp/RtpsUdpDataLink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -486,9 +486,9 @@ RtpsUdpDataLink::update_locators(const GUID_t& remote_id,
bool requires_inline_qos,
bool add_ref)
{
const bool log_error = log_level >= LogLevel::Error;
if (log_error && unicast_addresses.empty() && multicast_addresses.empty()) {
ACE_ERROR((LM_ERROR, "(%P|%t) ERROR: RtpsUdpDataLink::update_locators: "
const bool log_warn = log_level >= LogLevel::Warning;
if (log_warn && unicast_addresses.empty() && multicast_addresses.empty()) {
ACE_ERROR((LM_WARNING, "(%P|%t) WARNING: RtpsUdpDataLink::update_locators: "
"no addresses for %C\n", LogGuid(remote_id).c_str()));
}

Expand All @@ -503,19 +503,19 @@ RtpsUdpDataLink::update_locators(const GUID_t& remote_id,
RemoteInfoMap::iterator it = locators_.find(remote_id);
locators_.find(remote_id);
if (it == locators_.end()) {
if (log_error) {
if (log_warn) {
g.release();
ACE_ERROR((LM_ERROR, "(%P|%t) ERROR: RtpsUdpDataLink::update_locators: "
ACE_ERROR((LM_WARNING, "(%P|%t) WARNING: RtpsUdpDataLink::update_locators: "
"no existing locators to update for %C\n", LogGuid(remote_id).c_str()));
}
return;
}
info = &it->second;
}

const bool log = DCPS_debug_level >= 4;
const bool log_unicast_change = log && info->unicast_addrs_ != unicast_addresses;
const bool log_multicast_change = log && info->multicast_addrs_ != multicast_addresses;
const bool log_change = DCPS_debug_level >= 4;
const bool log_unicast_change = log_change && info->unicast_addrs_ != unicast_addresses;
const bool log_multicast_change = log_change && info->multicast_addrs_ != multicast_addresses;
info->unicast_addrs_.swap(unicast_addresses);
info->multicast_addrs_.swap(multicast_addresses);
info->requires_inline_qos_ = requires_inline_qos;
Expand Down

0 comments on commit 0bc9a99

Please sign in to comment.