summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwilson_d <wilson_d@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-11-11 22:59:56 +0000
committerwilson_d <wilson_d@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-11-11 22:59:56 +0000
commita72eb2e2742ac98acd482533b55408e0b8a2b8ee (patch)
tree35d64c5454e5f50f6d5142bb7f542930e9f59768
parente2afa5ff78bccdf66b76f981d875296c20827b35 (diff)
downloadATCD-a72eb2e2742ac98acd482533b55408e0b8a2b8ee.tar.gz
ChangeLogTag: Tue Nov 11 16:58:21 2003 Dale Wilson <wilson_d@ociweb.com>
-rw-r--r--TAO/ChangeLog7
-rwxr-xr-xTAO/orbsvcs/FT_ReplicationManager/FT_ReplicationManagerFaultAnalyzer.h1
-rw-r--r--TAO/orbsvcs/Fault_Detector/FT_FaultDetectorFactory_i.cpp47
-rw-r--r--TAO/orbsvcs/tests/FT_App/FT_ReplicaFactory_i.cpp47
4 files changed, 11 insertions, 91 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index a1253eeb865..015aeacbfbe 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,10 @@
+Tue Nov 11 16:58:21 2003 Dale Wilson <wilson_d@ociweb.com>
+
+ * orbsvcs/FT_ReplicationManager/FT_ReplicationManagerFaultAnalyzer.h:
+ * orbsvcs/Fault_Detector/FT_FaultDetectorFactory_i.cpp:
+ * orbsvcs/tests/FT_App/FT_ReplicaFactory_i.cpp:
+ Cast to FT::DomainID to const char * to make Any >>= work (etc.)
+
Tue Nov 11 16:21:26 2003 Dale Wilson <wilson_d@ociweb.com>
* orbsvcs/FT_ReplicationManager/FT_ReplicationManagerFaultAnalyzer.cpp:
diff --git a/TAO/orbsvcs/FT_ReplicationManager/FT_ReplicationManagerFaultAnalyzer.h b/TAO/orbsvcs/FT_ReplicationManager/FT_ReplicationManagerFaultAnalyzer.h
index d14c2bc5ed4..243740900b9 100755
--- a/TAO/orbsvcs/FT_ReplicationManager/FT_ReplicationManagerFaultAnalyzer.h
+++ b/TAO/orbsvcs/FT_ReplicationManager/FT_ReplicationManagerFaultAnalyzer.h
@@ -17,6 +17,7 @@
#define FT_REPLICATION_MANAGER_FAULT_ANALYZER_H_
#include /**/ "ace/pre.h"
+#include <ace/ACE.h>
#if !defined (ACE_LACKS_PRAGMA_ONCE)
#pragma once
diff --git a/TAO/orbsvcs/Fault_Detector/FT_FaultDetectorFactory_i.cpp b/TAO/orbsvcs/Fault_Detector/FT_FaultDetectorFactory_i.cpp
index f9fbfa036de..504d05b59fd 100644
--- a/TAO/orbsvcs/Fault_Detector/FT_FaultDetectorFactory_i.cpp
+++ b/TAO/orbsvcs/Fault_Detector/FT_FaultDetectorFactory_i.cpp
@@ -462,8 +462,6 @@ void TAO::FT_FaultDetectorFactory_i::change_properties (
::TAO_PG::Properties_Decoder decoder(property_set);
-#if 1 // PG_FIND
-
TimeBase::TimeT value = 0;
if( TAO_PG::find (decoder, FT::FT_FAULT_MONITORING_INTERVAL, value) )
{
@@ -485,46 +483,6 @@ void TAO::FT_FaultDetectorFactory_i::change_properties (
ex.nam[0].id = CORBA::string_dup(FT::FT_FAULT_MONITORING_INTERVAL);
ACE_THROW (ex);
}
-#else // PG_FIND
- TimeBase::TimeT value = 0;
- PortableGroup::Value * any;
- if ( decoder.find (FT::FT_FAULT_MONITORING_INTERVAL, any))
- {
- if ((*any) >>= value)
- {
- //@@ utility method to do this conversion?
- // note: these should be unsigned long, but
- // ACE_Time_Value wants longs.
- long uSec = ACE_static_cast (long, (value / timeT_per_uSec) % uSec_per_sec);
- long sec = ACE_static_cast (long, (value / timeT_per_uSec) / uSec_per_sec);
- ACE_Time_Value atv(sec, uSec);
- TAO::Fault_Detector_i::set_time_for_all_detectors(atv);
- }
- else
- {
- ACE_ERROR ((LM_ERROR,
- "Throwing Invalid Property type: %s\n",
- FT::FT_FAULT_MONITORING_INTERVAL
- ));
- ::PortableGroup::InvalidProperty ex;
- ex.nam.length(1);
- ex.nam[0].id = CORBA::string_dup(FT::FT_FAULT_MONITORING_INTERVAL);
- ACE_THROW (ex);
- }
- }
- else
- {
- ACE_ERROR ((LM_ERROR,
- "Throwing Missing Property: %s\n",
- FT::FT_FAULT_MONITORING_INTERVAL
- ));
- ::PortableGroup::InvalidProperty ex;
- ex.nam.length(1);
- ex.nam[0].id = CORBA::string_dup(FT::FT_FAULT_MONITORING_INTERVAL);
- ACE_THROW (ex);
- }
-#endif //PG_FIND
-
METHOD_RETURN(TAO::FT_FaultDetectorFactory_i::change_properties);
}
@@ -597,7 +555,8 @@ CORBA::Object_ptr TAO::FT_FaultDetectorFactory_i::create_object (
}
FT::FTDomainId domain_id = 0;
- if (! ::TAO_PG::find (decoder, ::FT::FT_DOMAIN_ID, domain_id) )
+ // note the cast in the next line makes ANY >>= work.
+ if (! ::TAO_PG::find (decoder, ::FT::FT_DOMAIN_ID, ACE_static_cast (const char *, domain_id)) )
{
domain_id = this->domain_;
@@ -623,7 +582,7 @@ CORBA::Object_ptr TAO::FT_FaultDetectorFactory_i::create_object (
}
FT::TypeId object_type = 0;
- if (! ::TAO_PG::find (decoder, ::FT::FT_TYPE_ID, object_type) )
+ if (! ::TAO_PG::find (decoder, ::FT::FT_TYPE_ID, ACE_static_cast (const char *, object_type)) )
{
object_type = "unknown";
// Not required: missingParameter = 1;
diff --git a/TAO/orbsvcs/tests/FT_App/FT_ReplicaFactory_i.cpp b/TAO/orbsvcs/tests/FT_App/FT_ReplicaFactory_i.cpp
index 0e8757c7747..412e411e198 100644
--- a/TAO/orbsvcs/tests/FT_App/FT_ReplicaFactory_i.cpp
+++ b/TAO/orbsvcs/tests/FT_App/FT_ReplicaFactory_i.cpp
@@ -633,7 +633,6 @@ CORBA::Object_ptr FT_ReplicaFactory_i::create_object (
int missingParameter = 0;
const char * missingParameterName = 0;
-#if 0 // PG_FIND
CORBA::Long initialValue = 0;
if (! ::TAO_PG::find (decoder, criterion_initial_value, initialValue) )
{
@@ -652,52 +651,6 @@ CORBA::Object_ptr FT_ReplicaFactory_i::create_object (
// missingParameter = 1;
// missingParameterName = PortableGroup::role_criterion;
}
-#else // PG_FIND
- CORBA::Long initialValue = 0;
- PortableGroup::Value * any;
- if (decoder.find (criterion_initial_value, any))
- {
- if (! ((*any) >>= initialValue))
- {
- // not required. Otherwise:
- // missingParameter = 1;
- // missingParameterName = criterion_initial_value;
- }
- }
- else
- {
- // not required. Otherwise:
- // missingParameter = 1;
- // missingParameterName = criterion_initial_value;
- }
-
- const char * role = "replica";
- if (decoder.find (PortableGroup::role_criterion, any) )
- {
- if ( ! ((*any) >>= role))
- {
-
- ACE_ERROR((LM_INFO,
- "Property \"%s\" not found?\n", PortableGroup::role_criterion
- ));
- // not required. Otherwise:
- // missingParameter = 1;
- // missingParameterName = PortableGroup::role_criterion;
- }
- }
- else
- {
-
- ACE_ERROR((LM_INFO,
- "Property \"%s\" not found?\n", PortableGroup::role_criterion
- ));
- // not required. Otherwise:
- // missingParameter = 1;
- // missingParameterName = PortableGroup::role_criterion;
- }
-
-#endif
-
if (missingParameter)
{
ACE_ERROR ((LM_ERROR,