summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1998-06-27 15:46:45 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1998-06-27 15:46:45 +0000
commitd178f3929adc2ad71feabe749c865a680e659515 (patch)
tree79130f9400b07ed6e0587cbbe6b9bde7c2bb59e4
parentbcf7d65a3d00290f89145f783aeaef664931a736 (diff)
downloadATCD-d178f3929adc2ad71feabe749c865a680e659515.tar.gz
*** empty log message ***
-rw-r--r--TAO/ChangeLog-98c13
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/Logger_i.cpp36
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/Logger_i.h4
3 files changed, 34 insertions, 19 deletions
diff --git a/TAO/ChangeLog-98c b/TAO/ChangeLog-98c
index 514bec36ed1..218ac035c81 100644
--- a/TAO/ChangeLog-98c
+++ b/TAO/ChangeLog-98c
@@ -1,3 +1,16 @@
+Sat Jun 27 10:32:46 1998 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu>
+
+ * orbsvcs/orbsvcs/Log/Logger_i.cpp (log): Must use a u_short cast
+ rather than an int cast to avoid ambiguity. Thanks to David
+ Levine for detecting this.
+
+ * orbsvcs/orbsvcs/Log/Logger_i.cpp: Fixed some minor problems with
+ constness. Thanks to David Levine for reporting this.
+
+Sat Jun 27 07:15:49 1998 Douglas C. Schmidt <schmidt@cs.wustl.edu>
+
+ * tests/NestedUpcall: Added a Makefile.
+
Sat Jun 27 07:15:49 1998 Douglas C. Schmidt <schmidt@cs.wustl.edu>
* TAO version 0.1.34 released.
diff --git a/TAO/orbsvcs/orbsvcs/Log/Logger_i.cpp b/TAO/orbsvcs/orbsvcs/Log/Logger_i.cpp
index d17869e43e0..c5c3054a836 100644
--- a/TAO/orbsvcs/orbsvcs/Log/Logger_i.cpp
+++ b/TAO/orbsvcs/orbsvcs/Log/Logger_i.cpp
@@ -34,13 +34,13 @@ Logger_i::~Logger_i (void)
// the ACE_Log_Priority enumerated type
ACE_Log_Priority
-priority_conversion (const Logger::Log_Priority prior1)
+Logger_i::priority_conversion (Logger::Log_Priority priority)
{
- if (prior1 == Logger::LM_MAX)
+ if (priority == Logger::LM_MAX)
return LM_MAX;
else
{
- int pval = ACE_static_cast (int, prior1);
+ int pval = ACE_static_cast (int, priority);
return ACE_static_cast (ACE_Log_Priority,
ACE_POW (pval));
@@ -51,35 +51,33 @@ void
Logger_i::log (const Logger::Log_Record &log_rec,
CORBA::Environment &_env)
{
- ACE_Log_Record rec (priority_conversion (log_rec.type),
+ ACE_Log_Record rec (this->priority_conversion (log_rec.type),
log_rec.time,
log_rec.app_id);
- // Create a ACE_Log_Record in order to leverage existing logging
- // code.The log2() is used because we can't specify values for enum
- // tags in IDL, but ACE_Log_Priority values are powers of 2
- // priority_names_() is essentially used to cast to the enum type
+ // Create an <ACE_Log_Record> to leverage existing logging code. The
+ // <ACE::log2> method is used because we can't specify values for
+ // enum tags in IDL, but <ACE_Log_Priority> values are powers of 2.
+ // Thus, <priority_conversion> is used to transform to an enum type.
ASYS_TCHAR msgbuf[ACE_MAXLOGMSGLEN + 1];
ACE_OS::strncpy (msgbuf,
log_rec.msg_data,
ACE_MAXLOGMSGLEN);
- // I don't think this is a good way to do this. Suggestions?
+ // I don't think this is a good way to do this. Suggestions? @@
+ // Matt, please make sure that the size of the array <msg_data> is
+ // no larger than ACE_MAXLOGMSGLEN...
+ // Set <ACE_Log_Record.msg_data> to the value stored in <msgbuf>.
rec.msg_data (msgbuf);
- // Set ACE_Log_Record.msg_data to the value stored in msgbuf
-#if 0
- // @@ This is currently unused. Remove them?
- hostent rhost;
- char storage[MAXHOSTNAMELEN + 1];
-#endif /* 0 */
+ CORBA::Long addr = log_rec.host_addr;
- ACE_INET_Addr addy (ACE_static_cast (int, 0),
- ACE_static_cast (ACE_UINT32,
- log_rec.host_addr));
- // The constructor for ACE_INET_Addr requires a port number, which
+ // The constructor for <ACE_INET_Addr> requires a port number, which
// is not relevant in this context, so we give it 0.
+ ACE_INET_Addr addy (ACE_static_cast (u_short, 0),
+ ACE_static_cast (ACE_UINT32,
+ addr));
ASYS_TCHAR namebuf[MAXHOSTNAMELEN + 1];
addy.get_host_name (namebuf,
diff --git a/TAO/orbsvcs/orbsvcs/Log/Logger_i.h b/TAO/orbsvcs/orbsvcs/Log/Logger_i.h
index 4e23244cadf..07aa92d280f 100644
--- a/TAO/orbsvcs/orbsvcs/Log/Logger_i.h
+++ b/TAO/orbsvcs/orbsvcs/Log/Logger_i.h
@@ -49,6 +49,10 @@ public:
CORBA::Environment &_env);
private:
+ ACE_Log_Priority priority_conversion (Logger::Log_Priority priority);
+ // This converts from the IDL defined <Log_Priority> enumerated type
+ // to the <ACE_Log_Priority> enumerated type.
+
char *name_;
// Logger identification.
};