summaryrefslogtreecommitdiff
path: root/TAO/tao/IIOP_Acceptor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/IIOP_Acceptor.cpp')
-rw-r--r--TAO/tao/IIOP_Acceptor.cpp76
1 files changed, 38 insertions, 38 deletions
diff --git a/TAO/tao/IIOP_Acceptor.cpp b/TAO/tao/IIOP_Acceptor.cpp
index ae4c3f769d4..1f8244e94b9 100644
--- a/TAO/tao/IIOP_Acceptor.cpp
+++ b/TAO/tao/IIOP_Acceptor.cpp
@@ -20,15 +20,15 @@
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-TAO_IIOP_Acceptor::TAO_IIOP_Acceptor (void)
+TAO_IIOP_Acceptor::TAO_IIOP_Acceptor ()
: TAO_Acceptor (IOP::TAG_INTERNET_IOP),
- addrs_ (0),
+ addrs_ (nullptr),
port_span_ (1),
- hosts_ (0),
- hostname_in_ior_ (0),
+ hosts_ (nullptr),
+ hostname_in_ior_ (nullptr),
endpoint_count_ (0),
version_ (TAO_DEF_GIOP_MAJOR, TAO_DEF_GIOP_MINOR),
- orb_core_ (0),
+ orb_core_ (nullptr),
reuse_addr_ (1),
#if defined (ACE_HAS_IPV6) && !defined (ACE_USES_IPV4_IPV6_MIGRATION)
default_address_ (static_cast<unsigned short> (0), ACE_IPV6_ANY, AF_INET6),
@@ -36,9 +36,9 @@ TAO_IIOP_Acceptor::TAO_IIOP_Acceptor (void)
default_address_ (static_cast<unsigned short> (0), static_cast<ACE_UINT32> (INADDR_ANY)),
#endif /* ACE_HAS_IPV6 && !ACE_USES_IPV4_IPV6_MIGRATION */
base_acceptor_ (this),
- creation_strategy_ (0),
- concurrency_strategy_ (0),
- accept_strategy_ (0)
+ creation_strategy_ (nullptr),
+ concurrency_strategy_ (nullptr),
+ accept_strategy_ (nullptr)
{
#if defined (ACE_HAS_IPV6) && defined (ACE_USES_IPV4_IPV6_MIGRATION)
if (ACE::ipv6_enabled())
@@ -49,7 +49,7 @@ TAO_IIOP_Acceptor::TAO_IIOP_Acceptor (void)
#endif /* ACE_HAS_IPV6 && ACE_USES_IPV4_IPV6_MIGRATION */
}
-TAO_IIOP_Acceptor::~TAO_IIOP_Acceptor (void)
+TAO_IIOP_Acceptor::~TAO_IIOP_Acceptor ()
{
// Make sure we are closed before we start destroying the
// strategies.
@@ -109,7 +109,7 @@ TAO_IIOP_Acceptor::create_new_profile (const TAO::ObjectKey &object_key,
&& ACE_OS::strcmp(this->hosts_[i], this->hosts_[0]) == 0)
continue;
- TAO_IIOP_Profile *pfile = 0;
+ TAO_IIOP_Profile *pfile = nullptr;
ACE_NEW_RETURN (pfile,
TAO_IIOP_Profile (this->hosts_[i],
this->addrs_[i].get_port_number (),
@@ -123,7 +123,7 @@ TAO_IIOP_Acceptor::create_new_profile (const TAO::ObjectKey &object_key,
if (mprofile.give_profile (pfile) == -1)
{
pfile->_decr_refcnt ();
- pfile = 0;
+ pfile = nullptr;
return -1;
}
@@ -150,8 +150,8 @@ TAO_IIOP_Acceptor::create_shared_profile (const TAO::ObjectKey &object_key,
CORBA::Short priority)
{
CORBA::ULong index = 0;
- TAO_Profile *pfile = 0;
- TAO_IIOP_Profile *iiop_profile = 0;
+ TAO_Profile *pfile = nullptr;
+ TAO_IIOP_Profile *iiop_profile = nullptr;
// First see if @a mprofile already contains a IIOP profile.
for (TAO_PHandle i = 0; i != mprofile.profile_count (); ++i)
@@ -166,7 +166,7 @@ TAO_IIOP_Acceptor::create_shared_profile (const TAO::ObjectKey &object_key,
// If <mprofile> doesn't contain a IIOP_Profile, we need to create
// one.
- if (iiop_profile == 0)
+ if (iiop_profile == nullptr)
{
ACE_NEW_RETURN (iiop_profile,
TAO_IIOP_Profile (this->hosts_[0],
@@ -182,7 +182,7 @@ TAO_IIOP_Acceptor::create_shared_profile (const TAO::ObjectKey &object_key,
if (mprofile.give_profile (iiop_profile) == -1)
{
iiop_profile->_decr_refcnt ();
- iiop_profile = 0;
+ iiop_profile = nullptr;
return -1;
}
@@ -211,7 +211,7 @@ TAO_IIOP_Acceptor::create_shared_profile (const TAO::ObjectKey &object_key,
ACE_OS::strcmp(this->hosts_[index], this->hosts_[0]) == 0)
continue;
- TAO_IIOP_Endpoint *endpoint = 0;
+ TAO_IIOP_Endpoint *endpoint = nullptr;
ACE_NEW_RETURN (endpoint,
TAO_IIOP_Endpoint (this->hosts_[index],
this->addrs_[index].get_port_number (),
@@ -231,7 +231,7 @@ TAO_IIOP_Acceptor::is_collocated (const TAO_Endpoint *endpoint)
dynamic_cast<const TAO_IIOP_Endpoint *> (endpoint);
// Make sure the dynamically cast pointer is valid.
- if (endp == 0)
+ if (endp == nullptr)
return 0;
for (CORBA::ULong i = 0; i < this->endpoint_count_; ++i)
@@ -251,7 +251,7 @@ TAO_IIOP_Acceptor::is_collocated (const TAO_Endpoint *endpoint)
}
int
-TAO_IIOP_Acceptor::close (void)
+TAO_IIOP_Acceptor::close ()
{
return this->base_acceptor_.close ();
}
@@ -274,7 +274,7 @@ TAO_IIOP_Acceptor::open (TAO_ORB_Core *orb_core,
this->orb_core_ = orb_core;
- if (this->hosts_ != 0)
+ if (this->hosts_ != nullptr)
{
// The hostname cache has already been set!
// This is bad mojo, i.e. an internal TAO error.
@@ -285,7 +285,7 @@ TAO_IIOP_Acceptor::open (TAO_ORB_Core *orb_core,
-1);
}
- if (address == 0)
+ if (address == nullptr)
return -1;
if (major >=0 && minor >= 0)
@@ -357,9 +357,9 @@ TAO_IIOP_Acceptor::open (TAO_ORB_Core *orb_core,
char *[this->endpoint_count_],
-1);
- this->hosts_[0] = 0;
+ this->hosts_[0] = nullptr;
- if (this->hostname_in_ior_ != 0)
+ if (this->hostname_in_ior_ != nullptr)
{
if (TAO_debug_level > 2)
{
@@ -395,7 +395,7 @@ TAO_IIOP_Acceptor::open_default (TAO_ORB_Core *orb_core,
{
this->orb_core_ = orb_core;
- if (this->hosts_ != 0)
+ if (this->hosts_ != nullptr)
{
// The hostname cache has already been set!
// This is bad mojo, i.e. an internal TAO error.
@@ -454,7 +454,7 @@ TAO_IIOP_Acceptor::open_i (const ACE_INET_Addr& addr,
this->creation_strategy_,
this->accept_strategy_,
this->concurrency_strategy_,
- 0, 0, 0, ACE_DEFAULT_ACCEPTOR_USE_SELECT,
+ nullptr, nullptr, nullptr, ACE_DEFAULT_ACCEPTOR_USE_SELECT,
this->reuse_addr_) == -1)
{
if (TAO_debug_level > 0)
@@ -490,7 +490,7 @@ TAO_IIOP_Acceptor::open_i (const ACE_INET_Addr& addr,
this->creation_strategy_,
this->accept_strategy_,
this->concurrency_strategy_,
- 0, 0, 0, ACE_DEFAULT_ACCEPTOR_USE_SELECT,
+ nullptr, nullptr, nullptr, ACE_DEFAULT_ACCEPTOR_USE_SELECT,
this->reuse_addr_) != -1)
{
found_a_port = true;
@@ -594,7 +594,7 @@ TAO_IIOP_Acceptor::hostname (TAO_ORB_Core *orb_core,
char *&host,
const char *specified_hostname)
{
- if (this->hostname_in_ior_ != 0)
+ if (this->hostname_in_ior_ != nullptr)
{
if (TAO_debug_level >= 5)
TAOLIB_DEBUG ((LM_DEBUG,
@@ -610,7 +610,7 @@ TAO_IIOP_Acceptor::hostname (TAO_ORB_Core *orb_core,
// just return ours.
return this->dotted_decimal_address (addr, host);
}
- else if (specified_hostname != 0)
+ else if (specified_hostname != nullptr)
{
// If the user specified a hostname, pass it back
// blindly as it overrides our choice of hostname.
@@ -710,7 +710,7 @@ TAO_IIOP_Acceptor::parse_address (const char *address,
#endif /* ACE_HAS_IPV6 */
if (!host_defaulted)
{
- if (port_separator_loc != 0)
+ if (port_separator_loc != nullptr)
{
// Extract out just the host part of the address.
size_t const len = port_separator_loc - address;
@@ -739,7 +739,7 @@ TAO_IIOP_Acceptor::parse_address (const char *address,
{
// First convert the port into a usable form.
unsigned short portno = 0;
- if (port_separator_loc != 0)
+ if (port_separator_loc != nullptr)
{
portno =
static_cast<u_short> (ACE_OS::atoi (port_separator_loc +
@@ -751,7 +751,7 @@ TAO_IIOP_Acceptor::parse_address (const char *address,
if (addr.set (this->default_address_) != 0)
return -1;
}
- else if (port_separator_loc == 0)
+ else if (port_separator_loc == nullptr)
{
// The address is a hostname. No port was specified, so assume
// port zero (port will be chosen for us).
@@ -788,7 +788,7 @@ TAO_IIOP_Acceptor::dotted_decimal_address (const ACE_INET_Addr &addr,
char *&host)
{
int result = 0;
- const char *tmp = 0;
+ const char *tmp = nullptr;
// If the IP address in the INET_Addr is the IN(6)ADDR_ANY address,
// then force the actual IP address to be used by initializing a new
@@ -812,7 +812,7 @@ TAO_IIOP_Acceptor::dotted_decimal_address (const ACE_INET_Addr &addr,
else
tmp = addr.get_host_addr ();
- if (tmp == 0 || result != 0)
+ if (tmp == nullptr || result != 0)
{
if (TAO_debug_level > 0)
TAOLIB_ERROR ((LM_ERROR,
@@ -834,7 +834,7 @@ TAO_IIOP_Acceptor::probe_interfaces (TAO_ORB_Core *orb_core, int def_type)
// it. The hostnames will then be used when creating a
// TAO_IIOP_Profile for each endpoint setup on the probed
// network interfaces.
- ACE_INET_Addr *if_addrs = 0;
+ ACE_INET_Addr *if_addrs = nullptr;
size_t if_cnt = 0;
if (ACE::get_ip_interfaces (if_cnt, if_addrs) != 0
@@ -846,7 +846,7 @@ TAO_IIOP_Acceptor::probe_interfaces (TAO_ORB_Core *orb_core, int def_type)
return -1;
}
- if (if_cnt == 0 || if_addrs == 0)
+ if (if_cnt == 0 || if_addrs == nullptr)
{
if (TAO_debug_level > 0)
{
@@ -1049,7 +1049,7 @@ TAO_IIOP_Acceptor::probe_interfaces (TAO_ORB_Core *orb_core, int def_type)
}
CORBA::ULong
-TAO_IIOP_Acceptor::endpoint_count (void)
+TAO_IIOP_Acceptor::endpoint_count ()
{
return this->endpoint_count_;
}
@@ -1112,7 +1112,7 @@ TAO_IIOP_Acceptor::object_key (IOP::TaggedProfile &profile,
int
TAO_IIOP_Acceptor::parse_options (const char *str)
{
- if (str == 0)
+ if (str == nullptr)
return 0; // No options to parse. Not a problem.
// Use an option format similar to the one used for CGI scripts in
@@ -1140,9 +1140,9 @@ TAO_IIOP_Acceptor::parse_options (const char *str)
// `option1=foo'
// `option2=bar'
- ACE_CString *argv_base = 0;
+ ACE_CString *argv_base = nullptr;
ACE_NEW_RETURN (argv_base, ACE_CString[argc],-1);
- ACE_CString **argv = 0;
+ ACE_CString **argv = nullptr;
ACE_NEW_RETURN (argv, ACE_CString*[argc],-1);
ACE_CString::size_type begin = 0;