summaryrefslogtreecommitdiff
path: root/TAO/tao
diff options
context:
space:
mode:
authorirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-03-30 22:00:55 +0000
committerirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-03-30 22:00:55 +0000
commitaf1b9cd67ca6faef051ce9e25e6ceca03ab18c54 (patch)
tree25938f309b95238f1b2a8bb8dc88ff586d896d90 /TAO/tao
parent03c4784597d349359a958f75c0f95edd84ba677d (diff)
downloadATCD-af1b9cd67ca6faef051ce9e25e6ceca03ab18c54.tar.gz
ChangeLogTag: Thu Mar 30 15:45:25 2000 Irfan Pyarali <irfan@cs.wustl.edu>
Diffstat (limited to 'TAO/tao')
-rw-r--r--TAO/tao/IIOP_Acceptor.cpp4
-rw-r--r--TAO/tao/SHMIOP_Acceptor.cpp4
-rw-r--r--TAO/tao/UIOP_Acceptor.cpp16
3 files changed, 19 insertions, 5 deletions
diff --git a/TAO/tao/IIOP_Acceptor.cpp b/TAO/tao/IIOP_Acceptor.cpp
index 7f2e628ccce..4c5f2f5b38b 100644
--- a/TAO/tao/IIOP_Acceptor.cpp
+++ b/TAO/tao/IIOP_Acceptor.cpp
@@ -59,6 +59,10 @@ TAO_IIOP_Acceptor::TAO_IIOP_Acceptor (CORBA::Boolean flag)
TAO_IIOP_Acceptor::~TAO_IIOP_Acceptor (void)
{
+ // Make sure we are closed before we start destroying the
+ // strategies.
+ this->close ();
+
delete this->creation_strategy_;
delete this->concurrency_strategy_;
delete this->accept_strategy_;
diff --git a/TAO/tao/SHMIOP_Acceptor.cpp b/TAO/tao/SHMIOP_Acceptor.cpp
index 7fc649bb91a..85253d50173 100644
--- a/TAO/tao/SHMIOP_Acceptor.cpp
+++ b/TAO/tao/SHMIOP_Acceptor.cpp
@@ -59,6 +59,10 @@ TAO_SHMIOP_Acceptor::TAO_SHMIOP_Acceptor (CORBA::Boolean flag)
TAO_SHMIOP_Acceptor::~TAO_SHMIOP_Acceptor (void)
{
+ // Make sure we are closed before we start destroying the
+ // strategies.
+ this->close ();
+
delete this->creation_strategy_;
delete this->concurrency_strategy_;
delete this->accept_strategy_;
diff --git a/TAO/tao/UIOP_Acceptor.cpp b/TAO/tao/UIOP_Acceptor.cpp
index 94dbd9cd13b..599b4661406 100644
--- a/TAO/tao/UIOP_Acceptor.cpp
+++ b/TAO/tao/UIOP_Acceptor.cpp
@@ -72,6 +72,10 @@ TAO_UIOP_Acceptor::TAO_UIOP_Acceptor (CORBA::Boolean flag)
TAO_UIOP_Acceptor::~TAO_UIOP_Acceptor (void)
{
+ // Make sure we are closed before we start destroying the
+ // strategies.
+ this->close ();
+
delete this->creation_strategy_;
delete this->concurrency_strategy_;
delete this->accept_strategy_;
@@ -144,13 +148,15 @@ TAO_UIOP_Acceptor::is_collocated (const TAO_Profile *pfile)
int
TAO_UIOP_Acceptor::close (void)
{
- ACE_UNIX_Addr addr;
+ if (this->unlink_on_close_)
+ {
+ ACE_UNIX_Addr addr;
- if (this->base_acceptor_.acceptor ().get_local_addr (addr) == -1)
- return -1;
+ if (this->base_acceptor_.acceptor ().get_local_addr (addr) == 0)
+ (void) ACE_OS::unlink (addr.get_path_name ());
- if (this->unlink_on_close_)
- (void) ACE_OS::unlink (addr.get_path_name ());
+ this->unlink_on_close_ = 0;
+ }
return this->base_acceptor_.close ();
}