summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1998-10-17 05:35:07 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1998-10-17 05:35:07 +0000
commitc7168fc1d4f11274d3cddb5fc77966c616724321 (patch)
tree26d6cbf7474dbb62f13f53cb779b0fe2a4a477ff
parent17a1eb65ef9f6cf7e95364363269463d87a3f28c (diff)
downloadATCD-c7168fc1d4f11274d3cddb5fc77966c616724321.tar.gz
*** empty log message ***
-rw-r--r--ChangeLog-98b5
-rw-r--r--tests/Service_Config_Test.cpp25
2 files changed, 20 insertions, 10 deletions
diff --git a/ChangeLog-98b b/ChangeLog-98b
index 3a8cbf2fa1f..678b48dbc4a 100644
--- a/ChangeLog-98b
+++ b/ChangeLog-98b
@@ -1,3 +1,8 @@
+Sat Oct 17 00:29:37 1998 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu>
+
+ * ace/Service_Config.cpp (process_directives): Only warn about a
+ missing svc.conf file if we're debugging.
+
Fri Oct 16 23:16:30 1998 David L. Levine <levine@cs.wustl.edu>
* docs/ACE-guidelines.html: 1) use complete sentences for
diff --git a/tests/Service_Config_Test.cpp b/tests/Service_Config_Test.cpp
index 5499ff44d24..6f6e3b912a9 100644
--- a/tests/Service_Config_Test.cpp
+++ b/tests/Service_Config_Test.cpp
@@ -75,7 +75,9 @@ Test_Singleton::instance (u_short variety)
static Test_Singleton *instances[VARIETIES] = { 0 };
if (instances[variety] == 0)
- ACE_NEW_RETURN (instances[variety], Test_Singleton (variety), 0);
+ ACE_NEW_RETURN (instances[variety],
+ Test_Singleton (variety),
+ 0);
ACE_Object_Manager::at_exit (instances[variety],
test_singleton_cleanup,
@@ -88,7 +90,8 @@ Test_Singleton::Test_Singleton (u_short variety)
{
if (variety_ != current_++)
{
- ACE_DEBUG ((LM_ERROR, "ERROR: instance %u created out of order!\n",
+ ACE_DEBUG ((LM_ERROR,
+ "ERROR: instance %u created out of order!\n",
variety_));
++error;
}
@@ -96,13 +99,15 @@ Test_Singleton::Test_Singleton (u_short variety)
// We can't reliably use ACE_Log_Msg in a destructor that is called by
// ACE_Object_Manager. Yet.
+
Test_Singleton::~Test_Singleton (void)
{
/* ACE_DEBUG ((LM_DEBUG, "Test_Singleton %u dtor\n", variety_)); */
if (variety_ != --current_)
{
- ACE_OS::fprintf (stderr, "ERROR: instance %u destroyed out of order!\n",
+ ACE_OS::fprintf (stderr,
+ "ERROR: instance %u destroyed out of order!\n",
variety_);
/* ACE_DEBUG ((LM_ERROR, "ERROR: instance %u destroyed out of order!\n",
variety_)); */
@@ -114,10 +119,10 @@ static void
run_test (int argc, char *argv[])
{
// We need this scope to make sure that the destructor for the
- // ACE_Service_Config gets called.
+ // <ACE_Service_Config> gets called.
ACE_Service_Config daemon;
- daemon.open (argc, argv);
+ ACE_ASSERT (daemon.open (argc, argv) != -1 || errno == ENOENT);
ACE_Time_Value tv (argc > 1 ? atoi (argv[1]) : 2);
@@ -131,12 +136,12 @@ main (int argc, char *argv[])
for (u_int i = 0; i < VARIETIES; ++i)
{
- Test_Singleton &s = *Test_Singleton::instance (i);
+ Test_Singleton *s = Test_Singleton::instance (i);
- if (&s == 0)
- {
- ACE_ERROR_RETURN ((LM_ERROR, "instance () allocate failed!\n"), 1);
- }
+ if (s == 0)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "instance () allocate failed!\n"),
+ 1);
}
run_test (argc, argv);