summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog-97a10
-rw-r--r--netsvcs/lib/Client_Logging_Handler.cpp10
-rw-r--r--tests/Time_Service_Test.cpp4
3 files changed, 21 insertions, 3 deletions
diff --git a/ChangeLog-97a b/ChangeLog-97a
index 163428a90fa..bcdb7dff980 100644
--- a/ChangeLog-97a
+++ b/ChangeLog-97a
@@ -1,5 +1,15 @@
Tue Mar 18 13:20:59 1997 Irfan Pyarali <irfan@flamenco.cs.wustl.edu>
+ * netsvcs/lib/Client_Logging_Handler.cpp: Added a check in fini()
+ to make sure we have a valid handler. If the connect attempt
+ failed, this->handler_ will be set to 0.
+
+ * tests/Mem_Map_Test.cpp: Added code that removes all temporary
+ files created by the test.
+
+ * tests/Time_Service_Test.cpp: Made sure we remove the backing
+ store file left behind by a aborted clerk process.
+
* examples/Reactor/Ntalker/ntalker.cpp: The ntalker now uses
ACE::register_stdin_handler to register the STDIN. This function
allows for portability.
diff --git a/netsvcs/lib/Client_Logging_Handler.cpp b/netsvcs/lib/Client_Logging_Handler.cpp
index 20212064353..0c51abb167b 100644
--- a/netsvcs/lib/Client_Logging_Handler.cpp
+++ b/netsvcs/lib/Client_Logging_Handler.cpp
@@ -258,7 +258,8 @@ private:
int
ACE_Client_Logging_Connector::fini (void)
{
- this->handler_->close (0);
+ if (this->handler_ != 0)
+ this->handler_->close (0);
return 0;
}
@@ -295,8 +296,11 @@ ACE_Client_Logging_Connector::init (int argc, char *argv[])
if (this->connect (this->handler_,
this->server_addr_,
ACE_Synch_Options::synch) == -1)
- ACE_ERROR ((LM_ERROR, "%p, using stdout\n",
- "can't connect to logging server"));
+ {
+ ACE_ERROR ((LM_ERROR, "%p, using stdout\n",
+ "can't connect to logging server"));
+ this->handler_ = 0;
+ }
return 0;
}
diff --git a/tests/Time_Service_Test.cpp b/tests/Time_Service_Test.cpp
index 62bc467a1e6..746d81d0235 100644
--- a/tests/Time_Service_Test.cpp
+++ b/tests/Time_Service_Test.cpp
@@ -73,6 +73,10 @@ main (int, char *[])
if (server.kill () == -1)
ACE_ERROR_RETURN ((LM_ERROR, "Kill failed for server.\n"), -1);
+ // Since we kill the clerk process, it does not do a graceful
+ // shutdown and the backing store file is left behind.
+ ACE_OS::unlink (ACE_DEFAULT_BACKING_STORE);
+
ACE_END_TEST;
return 0;
}