diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1999-11-28 00:22:11 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1999-11-28 00:22:11 +0000 |
commit | 28719d8de96a3bbf17102d7fe3ec8ef4130b2ad5 (patch) | |
tree | 47a528105bc6d8905d781794bf219cb4c709a52c /netsvcs | |
parent | eb715322bee0966f4eb1868530e7ef5002b25bf4 (diff) | |
download | ATCD-28719d8de96a3bbf17102d7fe3ec8ef4130b2ad5.tar.gz |
ChangeLogTag:Thu Nov 25 13:32:00 1999 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu>
Diffstat (limited to 'netsvcs')
-rw-r--r-- | netsvcs/lib/Client_Logging_Handler.cpp | 2 | ||||
-rw-r--r-- | netsvcs/lib/Logging_Strategy.cpp | 15 | ||||
-rw-r--r-- | netsvcs/lib/Logging_Strategy.h | 8 |
3 files changed, 22 insertions, 3 deletions
diff --git a/netsvcs/lib/Client_Logging_Handler.cpp b/netsvcs/lib/Client_Logging_Handler.cpp index a0b66ead2a4..23371c8aac4 100644 --- a/netsvcs/lib/Client_Logging_Handler.cpp +++ b/netsvcs/lib/Client_Logging_Handler.cpp @@ -417,9 +417,11 @@ ACE_Client_Logging_Acceptor::parse_args (int argc, char *argv[]) switch (c) { case 'h': + ACE_OS::free ((void *) this->server_host_); this->server_host_ = ACE_OS::strdup (get_opt.optarg); break; case 'k': + ACE_OS::free ((void *) this->logger_key_); this->logger_key_ = ACE_OS::strdup (get_opt.optarg); break; case 'p': diff --git a/netsvcs/lib/Logging_Strategy.cpp b/netsvcs/lib/Logging_Strategy.cpp index 2ce9b48d9bd..e47550d7a47 100644 --- a/netsvcs/lib/Logging_Strategy.cpp +++ b/netsvcs/lib/Logging_Strategy.cpp @@ -38,7 +38,6 @@ ACE_Logging_Strategy::parse_args (int argc, char *argv[]) char *temp; this->flags_ = 0; - this->filename_ = ACE_DEFAULT_LOGFILE; ACE_Get_Opt get_opt (argc, argv, "f:s:", 0); @@ -54,7 +53,8 @@ ACE_Logging_Strategy::parse_args (int argc, char *argv[]) case 's': // Ensure that the OSTREAM flag is set ACE_SET_BITS (this->flags_, ACE_Log_Msg::OSTREAM); - this->filename_ = get_opt.optarg; + ACE_OS::free ((void *) this->filename_); + this->filename_ = ACE_OS::strdup (get_opt.optarg); break; default: break; @@ -63,6 +63,17 @@ ACE_Logging_Strategy::parse_args (int argc, char *argv[]) return 0; } +ACE_Logging_Strategy::ACE_Logging_Strategy (void) + : filename_ (ACE_OS::strdup (ACE_DEFAULT_LOGFILE)) +{ +} + +int +ACE_Logging_Strategy::fini (void) +{ + ACE_OS::free ((void *) this->filename_); +} + int ACE_Logging_Strategy::init (int argc, char *argv[]) { diff --git a/netsvcs/lib/Logging_Strategy.h b/netsvcs/lib/Logging_Strategy.h index d8c86df8c3d..492da5c4ec2 100644 --- a/netsvcs/lib/Logging_Strategy.h +++ b/netsvcs/lib/Logging_Strategy.h @@ -35,8 +35,14 @@ class ACE_Logging_Strategy : public ACE_Service_Object // controlled. The output can be streamed to stderr, to a file, // to a logging daemon, or it can be set to be "silent". public: + ACE_Logging_Strategy (void); + // Constructor. + virtual int init (int argc, char *argv[]); - // Dynamic linking hook. + // Dynamic linking initialization hook. + + virtual int fini (void); + // Dynamic linking termination hook. int parse_args (int argc, char *argv[]); // Parse svc.conf arguments. |