summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjtc <jtc@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2008-05-30 23:33:29 +0000
committerjtc <jtc@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2008-05-30 23:33:29 +0000
commit247c9f0ffe4d2b3ed2303181368249dbb5bb9f97 (patch)
tree29107e98b7f38981af2bfb6f5d9a1fa9812daa3a
parentdf59d6000dc890db551ba07937472092c30f5aff (diff)
downloadATCD-247c9f0ffe4d2b3ed2303181368249dbb5bb9f97.tar.gz
ChangeLogTag: Fri May 30 23:32:47 UTC 2008 J.T. Conklin <jtc@acorntoolworks.com>
-rw-r--r--TAO/ChangeLog23
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/LogNotification.cpp33
2 files changed, 23 insertions, 33 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index e013a9f9ceb..b75ade313c8 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,15 +1,24 @@
+Fri May 30 23:32:47 UTC 2008 J.T. Conklin <jtc@acorntoolworks.com>
+
+ * orbsvcs/orbsvcs/Log/LogNotification.cpp:
+
+ Convert current time to TimeBase::TimeT with new
+ ORBSVCS_Time::to_Absolute_TimeT() method. This fixes a
+ bug where we were returning the time as a relative time,
+ and simplifies the code by removing temporaries.
+
Fri May 30 15:04:17 UTC 2008 J.T. Conklin <jtc@acorntoolworks.com>
* orbsvcs/orbsvcs/Time_Utilities.h:
* orbsvcs/orbsvcs/Time_Utilities.cpp:
- Add new methods ORBSVCS_Time::to_Absolute_Time_Value() and
- ORBSVCS_Time::to_Time_Value() which take an ACE_Time_Value
- parameter and return a TimeBase::TimeT. These are wrappers
- of the existing ORBSVCS_Time::Absolute_Time_Value_to_TimeT
- and ORBSVCS_Time::Time_Value_to_TimeT methods, but allow
- use in contexts that would otherwise need the introduction
- of a temporary.
+ Add new methods ORBSVCS_Time::to_Absolute_TimeT() and
+ ORBSVCS_Time::to_TimeT() which take an ACE_Time_Value parameter
+ and return a TimeBase::TimeT. These are wrappers around the
+ existing ORBSVCS_Time::Absolute_Time_Value_to_TimeT() and
+ ORBSVCS_Time::Time_Value_to_TimeT() methods, but allow use in
+ contexts that would otherwise require the introduction of a
+ temporary.
Fri May 30 13:21:20 UTC 2008 Chad Elliott <elliott_c@ociweb.com>
diff --git a/TAO/orbsvcs/orbsvcs/Log/LogNotification.cpp b/TAO/orbsvcs/orbsvcs/Log/LogNotification.cpp
index 0b0d77944d4..1c1ea76adc9 100644
--- a/TAO/orbsvcs/orbsvcs/Log/LogNotification.cpp
+++ b/TAO/orbsvcs/orbsvcs/Log/LogNotification.cpp
@@ -28,11 +28,8 @@ TAO_LogNotification::object_creation (DsLogAdmin::LogId id)
// The log id.
event.id = id;
- TimeBase::TimeT current_time;
- ACE_Time_Value now = ACE_OS::gettimeofday ();
- ORBSVCS_Time::Time_Value_to_TimeT(current_time, now);
-
- event.time = current_time;
+ // Time object created.
+ event.time = ORBSVCS_Time::to_Absolute_TimeT (ACE_OS::gettimeofday ());
any <<= event;
@@ -45,14 +42,11 @@ TAO_LogNotification::object_deletion (DsLogAdmin::LogId id)
CORBA::Any any;
DsLogNotification::ObjectDeletion event;
+ // The log id.
event.id = id;
- TimeBase::TimeT current_time;
- ACE_Time_Value now = ACE_OS::gettimeofday ();
- ORBSVCS_Time::Time_Value_to_TimeT(current_time, now);
-
// Time object deleted.
- event.time = current_time;
+ event.time = ORBSVCS_Time::to_Absolute_TimeT (ACE_OS::gettimeofday ());
any <<= event;
@@ -86,12 +80,7 @@ TAO_LogNotification::attribute_value_change (DsLogAdmin::Log_ptr log,
event.logref = DsLogAdmin::Log::_duplicate (log);
event.id = id;
-
- TimeBase::TimeT current_time;
- ACE_Time_Value now = ACE_OS::gettimeofday ();
- ORBSVCS_Time::Time_Value_to_TimeT (current_time, now);
-
- event.time = current_time;
+ event.time = ORBSVCS_Time::to_Absolute_TimeT (ACE_OS::gettimeofday ());
// The attribute type e.g. logFullAction, maxLogSize etc.
event.type = type;
@@ -252,11 +241,7 @@ TAO_LogNotification::state_change (DsLogAdmin::Log_ptr log,
event.logref = DsLogAdmin::Log::_duplicate (log);
event.id = id;
-
- TimeBase::TimeT current_time;
- ACE_Time_Value now = ACE_OS::gettimeofday ();
- ORBSVCS_Time::Time_Value_to_TimeT (current_time, now);
- event.time = current_time;
+ event.time = ORBSVCS_Time::to_Absolute_TimeT (ACE_OS::gettimeofday ());
// Administrative, Operational or Forwarding state.
event.type = type;
@@ -325,11 +310,7 @@ TAO_LogNotification::threshold_alarm (
event.logref = DsLogAdmin::Log::_duplicate (log);
event.id = id;
-
- TimeBase::TimeT current_time;
- ACE_Time_Value now = ACE_OS::gettimeofday ();
- ORBSVCS_Time::Time_Value_to_TimeT(current_time, now);
- event.time = current_time;
+ event.time = ORBSVCS_Time::to_Absolute_TimeT (ACE_OS::gettimeofday ());
event.crossed_value = crossedValue;
event.observed_value = observedValue;