summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1999-07-10 19:13:51 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1999-07-10 19:13:51 +0000
commit7faa395ac451c033477d9d9cd6619c981627b9dd (patch)
tree5fc2191f01c1ba2f5beb6c627d13cb9f306b943d
parentba3d239c56db331f9b88d597e1fcd9a64a193825 (diff)
downloadATCD-7faa395ac451c033477d9d9cd6619c981627b9dd.tar.gz
*** empty log message ***
-rw-r--r--ChangeLog-99b30
-rw-r--r--ace/SOCK_Acceptor.h8
-rw-r--r--ace/Service_Config.cpp47
3 files changed, 68 insertions, 17 deletions
diff --git a/ChangeLog-99b b/ChangeLog-99b
index a13ed54826c..08a555e4e29 100644
--- a/ChangeLog-99b
+++ b/ChangeLog-99b
@@ -1,3 +1,33 @@
+Sat Jul 10 13:16:50 1999 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu>
+
+ * ace/Malloc: Changed the type of pointer used by ACE_Name_Node
+ from void * to char * so that we can integrate this cleanly with
+ ACE_Based_Pointer<>, which will fail if we use void since we
+ can't return from a "void" function!
+
+ * tests/Thread_Pool_Test.cpp (open): Fixed another somewhat bogus
+ warning from EGCS related to initialization of loop variables.
+
+ * tests/New_Fail_Test.cpp (main): Make sure to initialize pointers
+ so that EGCS doesn't complain.
+
+ * tests/MT_Reactor_Timer_Test.cpp (main): Fixed a signed/unsigned
+ mismatch.
+
+ * tests: Added appropriate header comments for all the *.h files.
+
+ * tests/Cache_Map_Manager_Test.cpp: Capitlized the hash_key
+ class to be Hash_Key, which is standard ACE programming style.
+
+ * ace/Service_Config.cpp: Added yet another set of
+ changes to open_i() so that the -d option is handled
+ appropriately. Thanks to Jonathan Reis
+ <reis@minniemouse.cemax.com> for this fix.
+
+ * ace/SOCK_Acceptor.h: Clarified the parameters for
+ ACE_SOCK_Acceptor's constructor and open() methods. Thanks to
+ Ron MacKenzie <ronm@SLAC.Stanford.EDU> for motivating this.
+
Sat Jul 10 13:56:30 1999 Nanbor Wang <nanbor@cs.wustl.edu>
* tests/MT_Reactor_Timer_Test.cpp (main): Fixed signed/unsigned
diff --git a/ace/SOCK_Acceptor.h b/ace/SOCK_Acceptor.h
index e86ba1e8522..df703beca76 100644
--- a/ace/SOCK_Acceptor.h
+++ b/ace/SOCK_Acceptor.h
@@ -47,6 +47,9 @@ public:
int backlog = ACE_DEFAULT_BACKLOG,
int protocol = 0);
// Initialize a passive-mode BSD-style acceptor socket (no QoS).
+ // <local_sap> is the address that we're going to listen for
+ // connections on. If <reuse_addr> is 1 then we'll use the
+ // <SO_REUSEADDR> to reuse this address.
ACE_SOCK_Acceptor (const ACE_Addr &local_sap,
ACE_Protocol_Info *protocolinfo,
@@ -65,7 +68,10 @@ public:
int backlog = ACE_DEFAULT_BACKLOG,
int protocol = 0);
// Initialize a passive-mode BSD-style acceptor socket (no QoS).
- // Returns 0 on success and -1 on failure.
+ // <local_sap> is the address that we're going to listen for
+ // connections on. If <reuse_addr> is 1 then we'll use the
+ // <SO_REUSEADDR> to reuse this address. Returns 0 on success and
+ // -1 on failure.
int open (const ACE_Addr &local_sap,
ACE_Protocol_Info *protocolinfo,
diff --git a/ace/Service_Config.cpp b/ace/Service_Config.cpp
index 52a2ec4b190..50cd504b45b 100644
--- a/ace/Service_Config.cpp
+++ b/ace/Service_Config.cpp
@@ -536,6 +536,11 @@ ACE_Service_Config::open_i (const ASYS_TCHAR program_name[],
{
int result = 0;
ACE_TRACE ("ACE_Service_Config::open");
+ ACE_Log_Msg *log_msg = ACE_LOG_MSG;
+
+ // Record the current log setting upon entering this thread.
+ int debugging_enabled =
+ log_msg->log_priority_enabled (LM_DEBUG);
if (ACE_Service_Config::is_initialized_ != 0)
// Guard against reentrant processing!
@@ -545,8 +550,7 @@ ACE_Service_Config::open_i (const ASYS_TCHAR program_name[],
if (ACE_Service_Config::init_svc_conf_file_queue () == -1)
return -1;
-
- if (!ignore_default_svc_conf_file
+ else if (!ignore_default_svc_conf_file
&& ACE_Service_Config::svc_conf_file_queue_->is_empty ()
// Load the default "svc.conf" entry here if there weren't
// overriding -f arguments in <parse_args>.
@@ -557,15 +561,19 @@ ACE_Service_Config::open_i (const ASYS_TCHAR program_name[],
"enqueue_tail"),
-1);
- // Clear the LM_DEBUG bit from log messages if appropriate. This
- // will be reset at the bottom of this function.
+ // If -d was included as a startup parameter, the user wants debug
+ // information printed during service initialization.
if (ACE::debug ())
+ ACE_Log_Msg::enable_debug_messages ();
+ else
+ // The user has requested no debugging info.
ACE_Log_Msg::disable_debug_messages ();
+
// Become a daemon before doing anything else.
if (ACE_Service_Config::be_a_daemon_)
ACE_Service_Config::start_daemon ();
- u_long flags = ACE_LOG_MSG->flags ();
+ u_long flags = log_msg->flags ();
if (flags == 0)
// Only use STDERR if the caller hasn't already set the flags.
@@ -579,9 +587,9 @@ ACE_Service_Config::open_i (const ASYS_TCHAR program_name[],
// equal to the default static logger key.
key = ACE_Service_Config::logger_key_;
- if (ACE_LOG_MSG->open (program_name,
- flags,
- key) == -1)
+ if (log_msg->open (program_name,
+ flags,
+ key) == -1)
result = -1;
else
{
@@ -603,15 +611,16 @@ ACE_Service_Config::open_i (const ASYS_TCHAR program_name[],
result = -1;
else
{
- int result = ACE_Service_Config::process_commandline_directives ();
- result = ACE_Service_Config::process_directives () + result;
+ int result =
+ ACE_Service_Config::process_commandline_directives ();
+ result =
+ ACE_Service_Config::process_directives () + result;
}
- // There's no point in dealing with this on NT since it doesn't really
- // support signals very well...
+ // There's no point in dealing with this on NT since it doesn't
+ // really support signals very well...
#if !defined (ACE_LACKS_UNIX_SIGNALS)
- // This really ought to be a Singleton I suspect...
-
+ // @@ This really ought to be a Singleton.
if (ACE_Reactor::instance ()->register_handler
(ACE_Service_Config::signum_,
ACE_Service_Config::signal_handler_) == -1)
@@ -622,8 +631,13 @@ ACE_Service_Config::open_i (const ASYS_TCHAR program_name[],
ace_yy_delete_parse_buffer ();
- if (ACE::debug ())
+ // Reset debugging back to the way it was when we came into into
+ // <open_i>.
+ if (debugging_enabled)
ACE_Log_Msg::enable_debug_messages ();
+ else
+ // Debugging was off when we entered <open_i>.
+ ACE_Log_Msg::disable_debug_messages ();
return result;
}
@@ -633,7 +647,8 @@ ACE_Service_Config::ACE_Service_Config (const ASYS_TCHAR program_name[],
{
ACE_TRACE ("ACE_Service_Config::ACE_Service_Config");
- if (this->open (program_name, logger_key) == -1
+ if (this->open (program_name,
+ logger_key) == -1
&& errno != ENOENT)
// Only print out an error if it wasn't the svc.conf file that was
// missing.