summaryrefslogtreecommitdiff
path: root/TAO
diff options
context:
space:
mode:
authorbala <balanatarajan@users.noreply.github.com>2003-06-07 14:03:55 +0000
committerbala <balanatarajan@users.noreply.github.com>2003-06-07 14:03:55 +0000
commitb30238cef6fa0b3e0d37d40a48c3401d649de6d2 (patch)
treef64d3e70a9d65fbc60b65fb536934208d2303c49 /TAO
parentd29f08923e48aaf06b2fd344a50195895ea5a09e (diff)
downloadATCD-b30238cef6fa0b3e0d37d40a48c3401d649de6d2.tar.gz
ChangeLogTag:Sat Jun 07 08:50:13 2003 Balachandran Natarajan <bala@dre.vanderbilt.edu>
Diffstat (limited to 'TAO')
-rw-r--r--TAO/orbsvcs/ImplRepo_Service/ImR_Activator.dsp6
-rw-r--r--TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Endpoint.cpp52
-rw-r--r--TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Endpoint.h3
-rw-r--r--TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Endpoint.i35
-rw-r--r--TAO/tao/Endpoint.h4
-rw-r--r--TAO/tao/IIOP_Endpoint.cpp111
-rw-r--r--TAO/tao/IIOP_Endpoint.h4
-rw-r--r--TAO/tao/IIOP_Endpoint.i40
-rw-r--r--TAO/tao/Invocation.cpp3
-rw-r--r--TAO/tao/Strategies/DIOP_Endpoint.cpp92
-rw-r--r--TAO/tao/Strategies/DIOP_Endpoint.h6
-rw-r--r--TAO/tao/Strategies/DIOP_Endpoint.i45
-rw-r--r--TAO/tao/Strategies/SHMIOP_Endpoint.cpp122
-rw-r--r--TAO/tao/Strategies/SHMIOP_Endpoint.h4
-rw-r--r--TAO/tao/Strategies/SHMIOP_Endpoint.i48
-rw-r--r--TAO/tao/Strategies/UIOP_Endpoint.cpp26
-rw-r--r--TAO/tao/Strategies/UIOP_Endpoint.h6
-rw-r--r--TAO/tao/Stub.cpp2
-rw-r--r--TAO/tao/orbconf.h2
19 files changed, 283 insertions, 328 deletions
diff --git a/TAO/orbsvcs/ImplRepo_Service/ImR_Activator.dsp b/TAO/orbsvcs/ImplRepo_Service/ImR_Activator.dsp
index d86a8c1a77b..3775eb69b40 100644
--- a/TAO/orbsvcs/ImplRepo_Service/ImR_Activator.dsp
+++ b/TAO/orbsvcs/ImplRepo_Service/ImR_Activator.dsp
@@ -51,7 +51,8 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 TAO_Svc_Utils.lib TAO_IORTable.lib TAO_PortableServer.lib TAO.lib ACEXML_Parser.lib ACEXML.lib ace.lib user32.lib advapi32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\orbsvcs" /libpath:"..\..\tao\IORTable" /libpath:"..\..\tao\PortableServer" /libpath:"..\..\tao" /libpath:"..\..\..\ACEXML\parser\parser" /libpath:"..\..\..\ACEXML\common" /libpath:"..\..\..\ace"
+# ADD LINK32 TAO_Svc_Utils.lib TAO_IORTable.lib TAO_PortableServer.lib TAO_Strategies.lib TAO.lib ACEXML_Parser.lib ACEXML.lib ace.lib user32.lib advapi32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\orbsvcs" /libpath:"..\..\tao\IORTable" /libpath:"..\..\tao\PortableServer" /libpath:"..\..\tao" /libpath:"..\..\..\ACEXML\parser\parser" /libpath:"..\..\..\ACEXML\common" /libpath:"..\..\..\ace" /libpath:"..\..\..\TAO\Strategies"
+# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "ImR_Activator - Win32 Debug"
@@ -76,7 +77,8 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 TAO_Svc_Utilsd.lib TAO_IORTabled.lib TAO_PortableServerd.lib TAOd.lib ACEXML_Parserd.lib ACEXMLd.lib aced.lib user32.lib advapi32.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /pdbtype:sept /libpath:"..\orbsvcs" /libpath:"..\..\tao\IORTable" /libpath:"..\..\tao\PortableServer" /libpath:"..\..\tao" /libpath:"..\..\..\ACEXML\parser\parser" /libpath:"..\..\..\ACEXML\common" /libpath:"..\..\..\ace"
+# ADD LINK32 TAO_Svc_Utilsd.lib TAO_IORTabled.lib TAO_PortableServerd.lib TAO_Strategiesd.lib TAOd.lib ACEXML_Parserd.lib ACEXMLd.lib aced.lib user32.lib advapi32.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /pdbtype:sept /libpath:"..\orbsvcs" /libpath:"..\..\tao\IORTable" /libpath:"..\..\tao\PortableServer" /libpath:"..\..\tao" /libpath:"..\..\..\ACEXML\parser\parser" /libpath:"..\..\..\ACEXML\common" /libpath:"..\..\..\ace" /libpath:"..\..\tao\Strategies"
+# SUBTRACT LINK32 /pdb:none
!ENDIF
diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Endpoint.cpp b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Endpoint.cpp
index 869c96bb41c..be65ca41e3e 100644
--- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Endpoint.cpp
+++ b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Endpoint.cpp
@@ -106,18 +106,6 @@ TAO_SSLIOP_Endpoint::addr_to_string (char *buffer, size_t length)
return 0;
}
-void
-TAO_SSLIOP_Endpoint::reset_hint (void)
-{
- this->iiop_endpoint_->reset_hint ();
-
- // @@ Who is doing the locking here!
- /*if (this->ssl_hint_)
- {
- this->ssl_hint_->cleanup_hint ();
- this->ssl_hint_ = 0;
- }*/
-}
TAO_Endpoint *
TAO_SSLIOP_Endpoint::next (void)
@@ -158,6 +146,8 @@ TAO_SSLIOP_Endpoint::duplicate (void)
{
TAO_SSLIOP_Endpoint *endpoint = 0;
+ // @@ We need to set the priority of the newly formed endpoint. It
+ // shouldnt be a problem as long as SSL is not used with RTCORBA.
ACE_NEW_RETURN (endpoint,
TAO_SSLIOP_Endpoint (&this->ssl_component_,
0),
@@ -185,3 +175,41 @@ TAO_SSLIOP_Endpoint::hash (void)
? 0
: this->credentials_->hash ());
}
+
+
+const ACE_INET_Addr &
+TAO_SSLIOP_Endpoint::object_addr (void) const
+{
+ // The object_addr_ is initialized here, rather than at IOR decode
+ // time for several reasons:
+ // 1. A request on the object may never be invoked.
+ // 2. The DNS setup may have changed dynamically.
+ // ...etc..
+
+ // Double checked locking optimization.
+ if (this->object_addr_.get_type () != AF_INET)
+ {
+ // We need to modify the object_addr_ in this method. Do so
+ // using a non-const copy of the <this> pointer.
+ ACE_INET_Addr &ssl_addr =
+ ACE_const_cast (ACE_INET_Addr &, this->object_addr_);
+
+ const ACE_INET_Addr &iiop_addr = this->iiop_endpoint_->object_addr ();
+
+ TAO_SSLIOP_Endpoint *ssl_endpoint =
+ ACE_const_cast (TAO_SSLIOP_Endpoint *, this);
+
+ ACE_GUARD_RETURN (TAO_SYNCH_MUTEX,
+ guard,
+ ssl_endpoint->addr_lookup_lock_,
+ this->object_addr_);
+
+ if (this->object_addr_.get_type () != AF_INET)
+ {
+ ssl_addr = iiop_addr;
+ ssl_addr.set_port_number (this->ssl_component_.port);
+ }
+ }
+
+ return this->object_addr_;
+}
diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Endpoint.h b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Endpoint.h
index da6c1d49fd8..34c09c67ecf 100644
--- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Endpoint.h
+++ b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Endpoint.h
@@ -42,7 +42,7 @@ const ACE_UINT32 TAO_TAG_SSL_ENDPOINTS = 0x54414f01U;
* @brief SSLIOP-specific implementation of PP Framework Endpoint
* interface.
*
- *
+ *
*/
class TAO_SSLIOP_Export TAO_SSLIOP_Endpoint : public TAO_Endpoint
{
@@ -66,7 +66,6 @@ public:
//@{
virtual TAO_Endpoint *next (void);
virtual int addr_to_string (char *buffer, size_t length);
- virtual void reset_hint (void);
/// Return true if this endpoint is equivalent to @param
/// other_endpoint.
diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Endpoint.i b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Endpoint.i
index 0cd8c9c21f0..74a3a98409f 100644
--- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Endpoint.i
+++ b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Endpoint.i
@@ -42,42 +42,7 @@ TAO_SSLIOP_Endpoint::ssl_component (void) const
return this->ssl_component_;
}
-ACE_INLINE const ACE_INET_Addr &
-TAO_SSLIOP_Endpoint::object_addr (void) const
-{
- // The object_addr_ is initialized here, rather than at IOR decode
- // time for several reasons:
- // 1. A request on the object may never be invoked.
- // 2. The DNS setup may have changed dynamically.
- // ...etc..
-
- // Double checked locking optimization.
- if (this->object_addr_.get_type () != AF_INET)
- {
- // We need to modify the object_addr_ in this method. Do so
- // using a non-const copy of the <this> pointer.
- ACE_INET_Addr &ssl_addr =
- ACE_const_cast (ACE_INET_Addr &, this->object_addr_);
-
- const ACE_INET_Addr &iiop_addr = this->iiop_endpoint_->object_addr ();
-
- TAO_SSLIOP_Endpoint *ssl_endpoint =
- ACE_const_cast (TAO_SSLIOP_Endpoint *, this);
-
- ACE_GUARD_RETURN (TAO_SYNCH_MUTEX,
- guard,
- ssl_endpoint->addr_lookup_lock_,
- this->object_addr_);
- if (this->object_addr_.get_type () != AF_INET)
- {
- ssl_addr = iiop_addr;
- ssl_addr.set_port_number (this->ssl_component_.port);
- }
- }
-
- return this->object_addr_;
-}
ACE_INLINE void
TAO_SSLIOP_Endpoint::qop (Security::QOP q)
diff --git a/TAO/tao/Endpoint.h b/TAO/tao/Endpoint.h
index 35ab66a7268..8b7934bbb29 100644
--- a/TAO/tao/Endpoint.h
+++ b/TAO/tao/Endpoint.h
@@ -88,10 +88,6 @@ public:
*/
virtual int addr_to_string (char *buffer, size_t length) = 0;
- /// This method is used when a connection has been reset, requiring
- /// the hint to be cleaned up and reset to NULL.
- virtual void reset_hint (void) = 0;
-
/// This method returns a deep copy of the corresponding endpoints by
/// allocating memory.
virtual TAO_Endpoint *duplicate (void) = 0;
diff --git a/TAO/tao/IIOP_Endpoint.cpp b/TAO/tao/IIOP_Endpoint.cpp
index ffc372da2e3..bdddb474641 100644
--- a/TAO/tao/IIOP_Endpoint.cpp
+++ b/TAO/tao/IIOP_Endpoint.cpp
@@ -15,49 +15,51 @@ ACE_RCSID (tao,
TAO_IIOP_Endpoint::TAO_IIOP_Endpoint (const ACE_INET_Addr &addr,
int use_dotted_decimal_addresses)
- : TAO_Endpoint (IOP::TAG_INTERNET_IOP),
- host_ (),
- port_ (683), // default port (IANA assigned)
- object_addr_ (addr),
- object_addr_set_ (0),
- next_ (0)
+ : TAO_Endpoint (IOP::TAG_INTERNET_IOP)
+ , host_ ()
+ , port_ (683) // default port (IANA assigned)
+ , object_addr_ (addr)
+ , object_addr_set_ (0)
+ , next_ (0)
{
this->set (addr, use_dotted_decimal_addresses);
}
TAO_IIOP_Endpoint::TAO_IIOP_Endpoint (const char *host,
CORBA::UShort port,
- const ACE_INET_Addr &addr)
- : TAO_Endpoint (IOP::TAG_INTERNET_IOP),
- host_ (),
- port_ (port),
- object_addr_ (addr),
- object_addr_set_ (0),
- next_ (0)
+ const ACE_INET_Addr &addr,
+ CORBA::Short priority)
+ : TAO_Endpoint (IOP::TAG_INTERNET_IOP,
+ priority)
+ , host_ ()
+ , port_ (port)
+ , object_addr_ (addr)
+ , object_addr_set_ (0)
+ , next_ (0)
{
if (host != 0)
this->host_ = host;
}
TAO_IIOP_Endpoint::TAO_IIOP_Endpoint (void)
- : TAO_Endpoint (IOP::TAG_INTERNET_IOP),
- host_ (),
- port_ (683), // default port (IANA assigned)
- object_addr_ (),
- object_addr_set_ (0),
- next_ (0)
+ : TAO_Endpoint (IOP::TAG_INTERNET_IOP)
+ , host_ ()
+ , port_ (683) // default port (IANA assigned)
+ , object_addr_ ()
+ , object_addr_set_ (0)
+ , next_ (0)
{
}
TAO_IIOP_Endpoint::TAO_IIOP_Endpoint (const char *host,
CORBA::UShort port,
CORBA::Short priority)
- : TAO_Endpoint (IOP::TAG_INTERNET_IOP),
- host_ (),
- port_ (port),
- object_addr_ (),
- object_addr_set_ (0),
- next_ (0)
+ : TAO_Endpoint (IOP::TAG_INTERNET_IOP)
+ , host_ ()
+ , port_ (port)
+ , object_addr_ ()
+ , object_addr_set_ (0)
+ , next_ (0)
{
if (host != 0)
this->host_ = host;
@@ -126,14 +128,6 @@ TAO_IIOP_Endpoint::host (const char *h)
return this->host_.in ();
}
-void
-TAO_IIOP_Endpoint::reset_hint (void)
-{
- // Commented out for the time being....
- /* if (this->hint_)
- this->hint_->cleanup_hint ((void **) &this->hint_); */
-}
-
TAO_Endpoint *
TAO_IIOP_Endpoint::next (void)
{
@@ -143,23 +137,60 @@ TAO_IIOP_Endpoint::next (void)
TAO_Endpoint *
TAO_IIOP_Endpoint::duplicate (void)
{
- // @@ Bala, we probably need to make sure that the duplicate has the
- // same priority as the original. Although it does not matter in
- // the context this method is currently used, if somebody ends up
- // using this method for some other purpose later, this will be a
- // seed for bugs.
-
TAO_IIOP_Endpoint *endpoint = 0;
ACE_NEW_RETURN (endpoint,
TAO_IIOP_Endpoint (this->host_.in (),
this->port_,
- this->object_addr_),
+ this->object_addr_,
+ this->priority ()),
0);
return endpoint;
}
+const ACE_INET_Addr &
+TAO_IIOP_Endpoint::object_addr (void) const
+{
+ // The object_addr_ is initialized here, rather than at IOR decode
+ // time for several reasons:
+ // 1. A request on the object may never be invoked.
+ // 2. The DNS setup may have changed dynamically.
+ // ...etc..
+
+ // Double checked locking optimization.
+ if (!this->object_addr_set_)
+ {
+ ACE_GUARD_RETURN (TAO_SYNCH_MUTEX,
+ guard,
+ this->addr_lookup_lock_,
+ this->object_addr_);
+
+ if (!this->object_addr_set_)
+ {
+ if (this->object_addr_.set (this->port_,
+ this->host_.in ()) == -1)
+ {
+ // If this call fails, it most likely due a hostname
+ // lookup failure caused by a DNS misconfiguration. If
+ // a request is made to the object at the given host and
+ // port, then a CORBA::TRANSIENT() exception should be
+ // thrown.
+
+ // Invalidate the ACE_INET_Addr. This is used as a flag
+ // to denote that ACE_INET_Addr initialization failed.
+ this->object_addr_.set_type (-1);
+ }
+ else
+ {
+ this->object_addr_set_ = 1;
+ }
+ }
+ }
+
+ return this->object_addr_;
+}
+
CORBA::Boolean
TAO_IIOP_Endpoint::is_equivalent (const TAO_Endpoint *other_endpoint)
{
diff --git a/TAO/tao/IIOP_Endpoint.h b/TAO/tao/IIOP_Endpoint.h
index 84120ce23f2..7c15935325f 100644
--- a/TAO/tao/IIOP_Endpoint.h
+++ b/TAO/tao/IIOP_Endpoint.h
@@ -54,7 +54,8 @@ public:
/// does not require any address resolution processing.
TAO_IIOP_Endpoint (const char *host,
CORBA::UShort port,
- const ACE_INET_Addr &addr);
+ const ACE_INET_Addr &addr,
+ CORBA::Short priority = TAO_INVALID_PRIORITY);
/// Constructor.
TAO_IIOP_Endpoint (const ACE_INET_Addr &addr,
@@ -73,7 +74,6 @@ public:
virtual TAO_Endpoint *next (void);
virtual int addr_to_string (char *buffer, size_t length);
- virtual void reset_hint (void);
/// Makes a copy of <this>
virtual TAO_Endpoint *duplicate (void);
diff --git a/TAO/tao/IIOP_Endpoint.i b/TAO/tao/IIOP_Endpoint.i
index 896e0142f54..d439be3e94c 100644
--- a/TAO/tao/IIOP_Endpoint.i
+++ b/TAO/tao/IIOP_Endpoint.i
@@ -2,47 +2,7 @@
//
// $Id$
-ACE_INLINE const ACE_INET_Addr &
-TAO_IIOP_Endpoint::object_addr (void) const
-{
- // The object_addr_ is initialized here, rather than at IOR decode
- // time for several reasons:
- // 1. A request on the object may never be invoked.
- // 2. The DNS setup may have changed dynamically.
- // ...etc..
-
- // Double checked locking optimization.
- if (!this->object_addr_set_)
- {
- ACE_GUARD_RETURN (TAO_SYNCH_MUTEX,
- guard,
- this->addr_lookup_lock_,
- this->object_addr_);
-
- if (!this->object_addr_set_)
- {
- if (this->object_addr_.set (this->port_,
- this->host_.in ()) == -1)
- {
- // If this call fails, it most likely due a hostname
- // lookup failure caused by a DNS misconfiguration. If
- // a request is made to the object at the given host and
- // port, then a CORBA::TRANSIENT() exception should be
- // thrown.
- // Invalidate the ACE_INET_Addr. This is used as a flag
- // to denote that ACE_INET_Addr initialization failed.
- this->object_addr_.set_type (-1);
- }
- else
- {
- this->object_addr_set_ = 1;
- }
- }
- }
-
- return this->object_addr_;
-}
ACE_INLINE const char *
TAO_IIOP_Endpoint::host (void) const
diff --git a/TAO/tao/Invocation.cpp b/TAO/tao/Invocation.cpp
index 645ddb81afa..e3a3f6fa549 100644
--- a/TAO/tao/Invocation.cpp
+++ b/TAO/tao/Invocation.cpp
@@ -467,8 +467,6 @@ TAO_GIOP_Invocation::invoke (CORBA::Boolean write_semantics
}
this->transport_->close_connection ();
- this->endpoint_->reset_hint ();
-
this->restart_flag_ = 1;
return TAO_INVOKE_RESTART;
@@ -500,7 +498,6 @@ TAO_GIOP_Invocation::close_connection (void)
TAO_Transport::release (this->transport_);
this->transport_ = 0;
- this->endpoint_->reset_hint ();
this->endpoint_ = 0;
this->profile_ = 0;
diff --git a/TAO/tao/Strategies/DIOP_Endpoint.cpp b/TAO/tao/Strategies/DIOP_Endpoint.cpp
index 45e92f69912..d76c115b86f 100644
--- a/TAO/tao/Strategies/DIOP_Endpoint.cpp
+++ b/TAO/tao/Strategies/DIOP_Endpoint.cpp
@@ -18,25 +18,28 @@ ACE_RCSID(tao, DIOP_Endpoint, "$Id$")
TAO_DIOP_Endpoint::TAO_DIOP_Endpoint (const ACE_INET_Addr &addr,
int use_dotted_decimal_addresses)
- : TAO_Endpoint (TAO_TAG_UDP_PROFILE),
- host_ (),
- port_ (0),
- object_addr_ (addr),
- object_addr_set_ (0),
- next_ (0)
+
+ : TAO_Endpoint (TAO_TAG_UDP_PROFILE)
+ , host_ ()
+ , port_ (0)
+ , object_addr_ (addr)
+ , object_addr_set_ (0)
+ , next_ (0)
{
this->set (addr, use_dotted_decimal_addresses);
}
TAO_DIOP_Endpoint::TAO_DIOP_Endpoint (const char *host,
CORBA::UShort port,
- const ACE_INET_Addr &addr)
- : TAO_Endpoint (TAO_TAG_UDP_PROFILE),
- host_ (),
- port_ (port),
- object_addr_ (addr),
- object_addr_set_ (0),
- next_ (0)
+ const ACE_INET_Addr &addr,
+ CORBA::Short priority)
+ : TAO_Endpoint (TAO_TAG_UDP_PROFILE,
+ priority)
+ , host_ ()
+ , port_ (port)
+ , object_addr_ (addr)
+ , object_addr_set_ (0)
+ , next_ (0)
{
if (host != 0)
this->host_ = host;
@@ -130,14 +133,6 @@ TAO_DIOP_Endpoint::host (const char *h)
return this->host_.in ();
}
-void
-TAO_DIOP_Endpoint::reset_hint (void)
-{
- // Commented out for the time being....
- /* if (this->hint_)
- this->hint_->cleanup_hint ((void **) &this->hint_); */
-}
-
TAO_Endpoint *
TAO_DIOP_Endpoint::next (void)
{
@@ -147,18 +142,13 @@ TAO_DIOP_Endpoint::next (void)
TAO_Endpoint *
TAO_DIOP_Endpoint::duplicate (void)
{
- // @@ Bala, we probably need to make sure that the duplicate has the
- // same priority as the original. Although it does not matter in
- // the context this method is currently used, if somebody ends up
- // using this method for some other purpose later, this will be a
- // seed for bugs.
-
TAO_DIOP_Endpoint *endpoint = 0;
ACE_NEW_RETURN (endpoint,
TAO_DIOP_Endpoint (this->host_.in (),
this->port_,
- this->object_addr_),
+ this->object_addr_,
+ this->priority ()),
0);
return endpoint;
@@ -185,4 +175,50 @@ TAO_DIOP_Endpoint::hash (void)
return ACE::hash_pjw (this->host ()) + this->port ();
}
+const ACE_INET_Addr &
+TAO_DIOP_Endpoint::object_addr (void) const
+{
+ // The object_addr_ is initialized here, rather than at IOR decode
+ // time for several reasons:
+ // 1. A request on the object may never be invoked.
+ // 2. The DNS setup may have changed dynamically.
+ // ...etc..
+
+ // Double checked locking optimization.
+ if (!this->object_addr_set_)
+ {
+ // We need to modify the object_addr_ in this method. Do so
+ // using a non-const copy of the <this> pointer.
+ TAO_DIOP_Endpoint *endpoint =
+ ACE_const_cast (TAO_DIOP_Endpoint *,
+ this);
+
+ ACE_GUARD_RETURN (TAO_SYNCH_MUTEX,
+ guard,
+ endpoint->addr_lookup_lock_,
+ this->object_addr_ );
+
+ if (!this->object_addr_set_)
+ {
+ if (endpoint->object_addr_.set (this->port_,
+ this->host_.in ()) == -1)
+ {
+ // If this call fails, it most likely due a hostname
+ // lookup failure caused by a DNS misconfiguration. If
+ // a request is made to the object at the given host and
+ // port, then a CORBA::TRANSIENT() exception should be
+ // thrown.
+
+ // Invalidate the ACE_INET_Addr. This is used as a flag
+ // to denote that ACE_INET_Addr initialization failed.
+ endpoint->object_addr_.set_type (-1);
+ }
+ else
+ {
+ endpoint->object_addr_set_ = 1;
+ }
+ }
+ }
+ return this->object_addr_;
+}
#endif /* TAO_HAS_DIOP && TAO_HAS_DIOP != 0 */
diff --git a/TAO/tao/Strategies/DIOP_Endpoint.h b/TAO/tao/Strategies/DIOP_Endpoint.h
index 123ff403378..7cd40bc3e20 100644
--- a/TAO/tao/Strategies/DIOP_Endpoint.h
+++ b/TAO/tao/Strategies/DIOP_Endpoint.h
@@ -57,7 +57,8 @@ public:
/// does not require any address resolution processing.
TAO_DIOP_Endpoint (const char *host,
CORBA::UShort port,
- const ACE_INET_Addr &addr);
+ const ACE_INET_Addr &addr,
+ CORBA::Short priority = TAO_INVALID_PRIORITY);
/// Constructor.
TAO_DIOP_Endpoint (const ACE_INET_Addr &addr,
@@ -79,9 +80,6 @@ public:
//@{
virtual TAO_Endpoint *next (void);
virtual int addr_to_string (char *buffer, size_t length);
- virtual void reset_hint (void);
-
- /// Makes a copy of <this>
virtual TAO_Endpoint *duplicate (void);
/// Return true if this endpoint is equivalent to <other_endpoint>. Two
diff --git a/TAO/tao/Strategies/DIOP_Endpoint.i b/TAO/tao/Strategies/DIOP_Endpoint.i
index acdaaad50b5..1297351cf13 100644
--- a/TAO/tao/Strategies/DIOP_Endpoint.i
+++ b/TAO/tao/Strategies/DIOP_Endpoint.i
@@ -1,52 +1,7 @@
// -*- C++ -*-
// $Id$
-ACE_INLINE const ACE_INET_Addr &
-TAO_DIOP_Endpoint::object_addr (void) const
-{
- // The object_addr_ is initialized here, rather than at IOR decode
- // time for several reasons:
- // 1. A request on the object may never be invoked.
- // 2. The DNS setup may have changed dynamically.
- // ...etc..
-
- // Double checked locking optimization.
- if (!this->object_addr_set_)
- {
- // We need to modify the object_addr_ in this method. Do so
- // using a non-const copy of the <this> pointer.
- TAO_DIOP_Endpoint *endpoint =
- ACE_const_cast (TAO_DIOP_Endpoint *,
- this);
-
- ACE_GUARD_RETURN (TAO_SYNCH_MUTEX,
- guard,
- endpoint->addr_lookup_lock_,
- this->object_addr_ );
- if (!this->object_addr_set_)
- {
- if (endpoint->object_addr_.set (this->port_,
- this->host_.in ()) == -1)
- {
- // If this call fails, it most likely due a hostname
- // lookup failure caused by a DNS misconfiguration. If
- // a request is made to the object at the given host and
- // port, then a CORBA::TRANSIENT() exception should be
- // thrown.
-
- // Invalidate the ACE_INET_Addr. This is used as a flag
- // to denote that ACE_INET_Addr initialization failed.
- endpoint->object_addr_.set_type (-1);
- }
- else
- {
- endpoint->object_addr_set_ = 1;
- }
- }
- }
- return this->object_addr_;
-}
ACE_INLINE const char *
TAO_DIOP_Endpoint::host (void) const
diff --git a/TAO/tao/Strategies/SHMIOP_Endpoint.cpp b/TAO/tao/Strategies/SHMIOP_Endpoint.cpp
index 28e74cf69a9..e669448522b 100644
--- a/TAO/tao/Strategies/SHMIOP_Endpoint.cpp
+++ b/TAO/tao/Strategies/SHMIOP_Endpoint.cpp
@@ -17,61 +17,62 @@ ACE_RCSID(Strategies, SHMIOP_Endpoint, "$Id$")
TAO_SHMIOP_Endpoint::TAO_SHMIOP_Endpoint (const ACE_MEM_Addr &addr,
int use_dotted_decimal_addresses)
- : TAO_Endpoint (TAO_TAG_SHMEM_PROFILE),
- host_ (),
- port_ (0),
- object_addr_ (addr.get_remote_addr ()),
- object_addr_set_ (0),
- next_ (0)
+ : TAO_Endpoint (TAO_TAG_SHMEM_PROFILE)
+ , host_ ()
+ , port_ (0)
+ , object_addr_ (addr.get_remote_addr ())
+ , object_addr_set_ (0)
+ , next_ (0)
{
this->set (addr.get_remote_addr (), use_dotted_decimal_addresses);
}
TAO_SHMIOP_Endpoint::TAO_SHMIOP_Endpoint (const ACE_INET_Addr &addr,
int use_dotted_decimal_addresses)
- : TAO_Endpoint (TAO_TAG_SHMEM_PROFILE),
- host_ (),
- port_ (0),
- object_addr_ (addr),
- object_addr_set_ (0),
- next_ (0)
+ : TAO_Endpoint (TAO_TAG_SHMEM_PROFILE)
+ , host_ ()
+ , port_ (0)
+ , object_addr_ (addr)
+ , object_addr_set_ (0)
+ , next_ (0)
{
this->set (addr, use_dotted_decimal_addresses);
}
TAO_SHMIOP_Endpoint::TAO_SHMIOP_Endpoint (const char *host,
CORBA::UShort port,
- const ACE_INET_Addr &addr)
- : TAO_Endpoint (TAO_TAG_SHMEM_PROFILE),
- host_ (),
- port_ (port),
- object_addr_ (addr),
- object_addr_set_ (0),
- next_ (0)
+ const ACE_INET_Addr &addr,
+ CORBA::Short priority)
+ : TAO_Endpoint (TAO_TAG_SHMEM_PROFILE, priority)
+ , host_ ()
+ , port_ (port)
+ , object_addr_ (addr)
+ , object_addr_set_ (0)
+ , next_ (0)
{
if (host != 0)
this->host_ = host;
}
TAO_SHMIOP_Endpoint::TAO_SHMIOP_Endpoint (void)
- : TAO_Endpoint (TAO_TAG_SHMEM_PROFILE),
- host_ (),
- port_ (0),
- object_addr_ (),
- object_addr_set_ (0),
- next_ (0)
+ : TAO_Endpoint (TAO_TAG_SHMEM_PROFILE)
+ , host_ ()
+ , port_ (0)
+ , object_addr_ ()
+ , object_addr_set_ (0)
+ , next_ (0)
{
}
TAO_SHMIOP_Endpoint::TAO_SHMIOP_Endpoint (const char *host,
CORBA::UShort port,
CORBA::Short priority)
- : TAO_Endpoint (TAO_TAG_SHMEM_PROFILE),
- host_ (),
- port_ (port),
- object_addr_ (),
- object_addr_set_ (0),
- next_ (0)
+ : TAO_Endpoint (TAO_TAG_SHMEM_PROFILE)
+ , host_ ()
+ , port_ (port)
+ , object_addr_ ()
+ , object_addr_set_ (0)
+ , next_ (0)
{
if (host != 0)
this->host_ = host;
@@ -85,7 +86,7 @@ TAO_SHMIOP_Endpoint::~TAO_SHMIOP_Endpoint (void)
int
TAO_SHMIOP_Endpoint::set (const ACE_INET_Addr &addr,
- int use_dotted_decimal_addresses)
+ int use_dotted_decimal_addresses)
{
char tmp_host[MAXHOSTNAMELEN + 1];
@@ -140,13 +141,6 @@ TAO_SHMIOP_Endpoint::host (const char *h)
return this->host_.in ();
}
-void
-TAO_SHMIOP_Endpoint::reset_hint (void)
-{
- // if (this->hint_)
- //this->hint_->cleanup_hint ((void **) &this->hint_);
-}
-
TAO_Endpoint *
TAO_SHMIOP_Endpoint::next (void)
{
@@ -160,7 +154,8 @@ TAO_SHMIOP_Endpoint::duplicate (void)
ACE_NEW_RETURN (endpoint,
TAO_SHMIOP_Endpoint (this->host_.in (),
this->port_,
- this->object_addr_),
+ this->object_addr_,
+ this->priority ()),
0);
return endpoint;
@@ -192,4 +187,51 @@ TAO_SHMIOP_Endpoint::hash (void)
+ this->port_;
}
+const ACE_INET_Addr &
+TAO_SHMIOP_Endpoint::object_addr (void) const
+{
+ // The object_addr_ is initialized here, rather than at IOR decode
+ // time for several reasons:
+ // 1. A request on the object may never be invoked.
+ // 2. The DNS setup may have changed dynamically.
+ // ...etc..
+
+ // Double checked locking optimization.
+ if (!this->object_addr_set_)
+ {
+ // We need to modify the object_addr_ in this method. Do so
+ // using a non-const copy of the <this> pointer.
+ TAO_SHMIOP_Endpoint *endpoint =
+ ACE_const_cast (TAO_SHMIOP_Endpoint *,
+ this);
+
+ ACE_GUARD_RETURN (TAO_SYNCH_MUTEX,
+ guard,
+ endpoint->addr_lookup_lock_,
+ this->object_addr_ );
+
+ if (!this->object_addr_set_)
+ {
+ if (endpoint->object_addr_.set (this->port_,
+ this->host_.in ()) == -1)
+ {
+ // If this call fails, it most likely due a hostname
+ // lookup failure caused by a DNS misconfiguration. If
+ // a request is made to the object at the given host and
+ // port, then a CORBA::TRANSIENT() exception should be
+ // thrown.
+
+ // Invalidate the ACE_INET_Addr. This is used as a flag
+ // to denote that ACE_INET_Addr initialization failed.
+ endpoint->object_addr_.set_type (-1);
+ }
+ else
+ {
+ endpoint->object_addr_set_ = 1;
+ }
+ }
+ }
+
+ return this->object_addr_;
+}
#endif /* TAO_HAS_SHMIOP && TAO_HAS_SHMIOP != 0 */
diff --git a/TAO/tao/Strategies/SHMIOP_Endpoint.h b/TAO/tao/Strategies/SHMIOP_Endpoint.h
index 9c6035d1242..e9efd2b74fb 100644
--- a/TAO/tao/Strategies/SHMIOP_Endpoint.h
+++ b/TAO/tao/Strategies/SHMIOP_Endpoint.h
@@ -54,7 +54,8 @@ public:
/// does not require any address resolution processing.
TAO_SHMIOP_Endpoint (const char *host,
CORBA::UShort port,
- const ACE_INET_Addr &addr);
+ const ACE_INET_Addr &addr,
+ CORBA::Short priority = TAO_INVALID_PRIORITY);
/// Constructor.
TAO_SHMIOP_Endpoint (const ACE_MEM_Addr &addr,
@@ -82,7 +83,6 @@ public:
/// Return a copy of <this>
virtual TAO_Endpoint *next (void);
virtual int addr_to_string (char *buffer, size_t length);
- virtual void reset_hint (void);
virtual TAO_Endpoint *duplicate (void);
/// Return true if this endpoint is equivalent to <other_endpoint>. Two
diff --git a/TAO/tao/Strategies/SHMIOP_Endpoint.i b/TAO/tao/Strategies/SHMIOP_Endpoint.i
index c37e12aaebd..e5a11fae5ab 100644
--- a/TAO/tao/Strategies/SHMIOP_Endpoint.i
+++ b/TAO/tao/Strategies/SHMIOP_Endpoint.i
@@ -1,54 +1,6 @@
// -*- C++ -*-
// $Id$
-ACE_INLINE const ACE_INET_Addr &
-TAO_SHMIOP_Endpoint::object_addr (void) const
-{
- // The object_addr_ is initialized here, rather than at IOR decode
- // time for several reasons:
- // 1. A request on the object may never be invoked.
- // 2. The DNS setup may have changed dynamically.
- // ...etc..
-
- // Double checked locking optimization.
- if (!this->object_addr_set_)
- {
- // We need to modify the object_addr_ in this method. Do so
- // using a non-const copy of the <this> pointer.
- TAO_SHMIOP_Endpoint *endpoint =
- ACE_const_cast (TAO_SHMIOP_Endpoint *,
- this);
-
- ACE_GUARD_RETURN (TAO_SYNCH_MUTEX,
- guard,
- endpoint->addr_lookup_lock_,
- this->object_addr_ );
-
- if (!this->object_addr_set_)
- {
- if (endpoint->object_addr_.set (this->port_,
- this->host_.in ()) == -1)
- {
- // If this call fails, it most likely due a hostname
- // lookup failure caused by a DNS misconfiguration. If
- // a request is made to the object at the given host and
- // port, then a CORBA::TRANSIENT() exception should be
- // thrown.
-
- // Invalidate the ACE_INET_Addr. This is used as a flag
- // to denote that ACE_INET_Addr initialization failed.
- endpoint->object_addr_.set_type (-1);
- }
- else
- {
- endpoint->object_addr_set_ = 1;
- }
- }
- }
-
- return this->object_addr_;
-}
-
ACE_INLINE const char *
TAO_SHMIOP_Endpoint::host (void) const
{
diff --git a/TAO/tao/Strategies/UIOP_Endpoint.cpp b/TAO/tao/Strategies/UIOP_Endpoint.cpp
index 2114bf893da..0255862e264 100644
--- a/TAO/tao/Strategies/UIOP_Endpoint.cpp
+++ b/TAO/tao/Strategies/UIOP_Endpoint.cpp
@@ -13,17 +13,19 @@ ACE_RCSID(Strategies, UIOP_Endpoint, "$Id$")
# include "UIOP_Endpoint.i"
#endif /* __ACE_INLINE__ */
-TAO_UIOP_Endpoint::TAO_UIOP_Endpoint (const ACE_UNIX_Addr &addr)
- : TAO_Endpoint (TAO_TAG_UIOP_PROFILE),
- object_addr_ (addr),
- next_ (0)
+TAO_UIOP_Endpoint::TAO_UIOP_Endpoint (const ACE_UNIX_Addr &addr,
+ CORBA::Short priority)
+ : TAO_Endpoint (TAO_TAG_UIOP_PROFILE,
+ priority)
+ , object_addr_ (addr)
+ , next_ (0)
{
}
TAO_UIOP_Endpoint::TAO_UIOP_Endpoint (void)
- : TAO_Endpoint (TAO_TAG_UIOP_PROFILE),
- object_addr_ (),
- next_ (0)
+ : TAO_Endpoint (TAO_TAG_UIOP_PROFILE)
+ , object_addr_ ()
+ , next_ (0)
{
}
@@ -42,13 +44,6 @@ TAO_UIOP_Endpoint::addr_to_string (char *buffer, size_t length)
return 0;
}
-void
-TAO_UIOP_Endpoint::reset_hint (void)
-{
- // if (this->hint_)
- //this->hint_->cleanup_hint ((void **) &this->hint_);
-}
-
TAO_Endpoint *
TAO_UIOP_Endpoint::next (void)
{
@@ -60,7 +55,8 @@ TAO_UIOP_Endpoint::duplicate (void)
{
TAO_UIOP_Endpoint *endpoint = 0;
ACE_NEW_RETURN (endpoint,
- TAO_UIOP_Endpoint (this->object_addr_),
+ TAO_UIOP_Endpoint (this->object_addr_,
+ this->priority ()),
0);
return endpoint;
diff --git a/TAO/tao/Strategies/UIOP_Endpoint.h b/TAO/tao/Strategies/UIOP_Endpoint.h
index 0422a563216..f7269f28550 100644
--- a/TAO/tao/Strategies/UIOP_Endpoint.h
+++ b/TAO/tao/Strategies/UIOP_Endpoint.h
@@ -47,7 +47,8 @@ public:
TAO_UIOP_Endpoint (void);
/// Constructor.
- TAO_UIOP_Endpoint (const ACE_UNIX_Addr &addr);
+ TAO_UIOP_Endpoint (const ACE_UNIX_Addr &addr,
+ CORBA::Short priority = TAO_INVALID_PRIORITY);
/// Destructor.
~TAO_UIOP_Endpoint (void);
@@ -60,9 +61,6 @@ public:
//@{
virtual TAO_Endpoint *next (void);
virtual int addr_to_string (char *buffer, size_t length);
- virtual void reset_hint (void);
-
- /// Returns a copy of <this>
virtual TAO_Endpoint *duplicate (void);
/// Return true if this endpoint is equivalent to <other_endpoint>. Two
diff --git a/TAO/tao/Stub.cpp b/TAO/tao/Stub.cpp
index 165010be672..ddcc8568985 100644
--- a/TAO/tao/Stub.cpp
+++ b/TAO/tao/Stub.cpp
@@ -100,8 +100,6 @@ TAO_Stub::~TAO_Stub (void)
// reset the hint in case it points to non-existent
// connection handler.
TAO_Endpoint* ep = this->profile_in_use_->endpoint ();
- if (ep)
- ep->reset_hint ();
}
// decrease reference count on profile
diff --git a/TAO/tao/orbconf.h b/TAO/tao/orbconf.h
index 494805b3e57..be0520e1327 100644
--- a/TAO/tao/orbconf.h
+++ b/TAO/tao/orbconf.h
@@ -18,6 +18,8 @@
#define TAO_ORBCONF_H
#include "ace/pre.h"
+#include "tao/taoconfig.h"
+
// "ace/OS.h" is overkill. "ace/Basic_Types.h" is enough. In
// particular, it is needed for the definition of ACE_LITTLE_ENDIAN.
#include "ace/Basic_Types.h"