summaryrefslogtreecommitdiff
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
parent03c4784597d349359a958f75c0f95edd84ba677d (diff)
downloadATCD-af1b9cd67ca6faef051ce9e25e6ceca03ab18c54.tar.gz
ChangeLogTag: Thu Mar 30 15:45:25 2000 Irfan Pyarali <irfan@cs.wustl.edu>
-rw-r--r--TAO/ChangeLogs/ChangeLog-02a13
-rw-r--r--TAO/tao/IIOP_Acceptor.cpp4
-rw-r--r--TAO/tao/SHMIOP_Acceptor.cpp4
-rw-r--r--TAO/tao/UIOP_Acceptor.cpp16
4 files changed, 32 insertions, 5 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a
index ae3532d37e0..153e39e0598 100644
--- a/TAO/ChangeLogs/ChangeLog-02a
+++ b/TAO/ChangeLogs/ChangeLog-02a
@@ -1,3 +1,16 @@
+Thu Mar 30 15:45:25 2000 Irfan Pyarali <irfan@cs.wustl.edu>
+
+ * tao/SHMIOP_Acceptor.cpp (TAO_SHMIOP_Acceptor::~TAO_SHMIOP_Acceptor):
+ * tao/IIOP_Acceptor.cpp (TAO_IIOP_Acceptor::~TAO_IIOP_Acceptor):
+ * tao/UIOP_Acceptor.cpp (TAO_UIOP_Acceptor::~TAO_UIOP_Acceptor):
+
+ Make sure we close down before we start destroying the
+ strategies. This will make sure that the base class will not
+ try to access the destroyed strategies in its destructor.
+ TAO_UIOP_Acceptor::close() needed a little modification that
+ would make it ok to call it multiple times. Thanks to Sangwoo
+ Jin <swjinjin@sei.co.kr> for reporting this bug.
+
Thu Mar 30 12:16:25 2000 Pradeep Gore <pradeep@flamenco.cs.wustl.edu>
* orbsvcs/Notify_Service/Notify_Service.{h.cpp}:
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 ();
}