summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngelo Corsaro <angelo@icorsaro.net>2000-08-16 00:17:04 +0000
committerAngelo Corsaro <angelo@icorsaro.net>2000-08-16 00:17:04 +0000
commitaa62e3ff911ae03c1124cea3d8180ad3bc61942c (patch)
treea15cc50ac4202862918d3743ca966c09a8e4cf35
parent0e649206b10907cbe808a3b7b96ffad3e2588de3 (diff)
downloadATCD-aa62e3ff911ae03c1124cea3d8180ad3bc61942c.tar.gz
ChangeLogTag: Tue Aug 15 19:05:50 2000 Angelo Corsaro <corsaro@cs.wustl.edu>
-rw-r--r--TAO/ChangeLogs/ChangeLog-02a17
-rw-r--r--TAO/tao/POA.cpp4
-rw-r--r--TAO/tao/Profile.cpp22
-rw-r--r--TAO/tao/RT_Policy_i.cpp55
-rw-r--r--TAO/tao/RT_Policy_i.h6
-rw-r--r--TAO/tao/Stub.cpp4
6 files changed, 71 insertions, 37 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a
index 416f9b87bc9..7db1276f0fd 100644
--- a/TAO/ChangeLogs/ChangeLog-02a
+++ b/TAO/ChangeLogs/ChangeLog-02a
@@ -1,3 +1,20 @@
+Tue Aug 15 19:05:50 2000 Angelo Corsaro <corsaro@cs.wustl.edu>
+
+ * tao/RT_Policy_i.cpp:
+ * tao/RT_Policy_i.h:
+ Fixed minor bug in the decoding of the policy
+ <TAO_ClientProtocolPolicy>.
+
+ Added methods for GIOP Properties encoding (i.e.
+ _tao_encode and _tao_decode).
+
+ * tao/Stub.cpp
+ * tao/Mprofile.i
+ * tao/Profile.cpp
+ * tao/POA.cpp
+ Removed some ACE_DEBUG used for testing some RT-CORBA
+ features.
+
Tue Aug 15 16:49:11 2000 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu>
* tao/Asynch_Reply_Dispatcher.cpp (TAO_Asynch_Reply_Dispatcher): The
diff --git a/TAO/tao/POA.cpp b/TAO/tao/POA.cpp
index 3a9f0b12dcc..4d59488909f 100644
--- a/TAO/tao/POA.cpp
+++ b/TAO/tao/POA.cpp
@@ -3952,10 +3952,12 @@ TAO_POA::client_exposed_policies (CORBA::Short object_priority,
CORBA::PolicyList *client_exposed_policies = 0;
ACE_NEW_THROW_EX (client_exposed_policies,
- CORBA::PolicyList (client_exposed_fixed_policies.length ()),
+ CORBA::PolicyList (),
CORBA::NO_MEMORY (TAO_DEFAULT_MINOR_CODE,
CORBA::COMPLETED_NO));
ACE_CHECK_RETURN (0);
+
+ client_exposed_policies->length (client_exposed_fixed_policies.length ());
for (CORBA::ULong i = 0;
i < client_exposed_fixed_policies.length ();
diff --git a/TAO/tao/Profile.cpp b/TAO/tao/Profile.cpp
index a9edf14234b..48185089348 100644
--- a/TAO/tao/Profile.cpp
+++ b/TAO/tao/Profile.cpp
@@ -59,9 +59,12 @@ TAO_Profile::policies (CORBA::PolicyList *policy_list)
buf += iterator->length ();
}
+ //policy_value_seq[i] = pv;
+
// Reset the CDR buffer index so that the buffer can
// be reused for the next conversion.
+ //out_CDR.reset ();
}
TAO_OutputCDR out_CDR;
@@ -75,7 +78,6 @@ TAO_Profile::policies (CORBA::PolicyList *policy_list)
out_CDR << policy_value_seq;
length = out_CDR.total_length ();
- ACE_DEBUG ((LM_DEBUG, "CDR Length: %d\n", length));
tagged_component.component_data.length(length);
buf = tagged_component.component_data.get_buffer ();
@@ -87,20 +89,18 @@ TAO_Profile::policies (CORBA::PolicyList *policy_list)
{
i_length = iterator->length ();
- ACE_DEBUG ((LM_DEBUG, "Iterator Length: %d\n", i_length));
ACE_OS::memcpy (buf, iterator->rd_ptr (), iterator->length ());
buf += iterator->length ();
i_length = iterator->length ();
- ACE_DEBUG ((LM_DEBUG, "Iterator Length: %d\n", i_length));
}
// Eventually we add the TaggedComponent to the TAO_TaggedComponents
// member variable.
- this->tagged_components_.set_component (tagged_component);
- this->are_policies_parsed_ = 1;
-
+ tagged_components_.set_component (tagged_component);
+ are_policies_parsed_ = 1;
+
#else /* TAO_HAS_CORBA_MESSAGING == 1 */
ACE_UNUSED_ARG (policy_list);
@@ -114,9 +114,8 @@ TAO_Profile::policies (void)
{
#if (TAO_HAS_CORBA_MESSAGING == 1)
- ACE_DEBUG ((LM_DEBUG, "TAO_Profile::policies Decoder called.\n"));
CORBA::PolicyList *policies = this->stub_->base_profiles ().policy_list ();
- if (!this->are_policies_parsed_
+ if (!are_policies_parsed_
&& (policies->length () == 0))
// None has already parsed the policies.
{
@@ -150,8 +149,7 @@ TAO_Profile::policies (void)
CORBA::Policy *policy = 0;
CORBA::ULong length = policy_value_seq.length ();
- // Get the policy list from the MProfile.
- CORBA::PolicyList *policies = stub_->base_profiles ().policy_list ();
+ // Set the policy list length.
policies->length (length);
for (CORBA::ULong i = 0; i < length; i++)
@@ -189,7 +187,7 @@ TAO_Profile::policies (void)
#endif /* (TAO_HAS_CORBA_MESSAGING == 1) */
- return *(this->stub_->base_profiles ().policy_list ());
+ return *(stub_->base_profiles ().policy_list ());
}
void
@@ -201,7 +199,7 @@ TAO_Profile::the_stub (TAO_Stub *stub)
TAO_Stub*
TAO_Profile::the_stub (void)
{
- return this->stub_;
+ return stub_;
}
// ****************************************************************
diff --git a/TAO/tao/RT_Policy_i.cpp b/TAO/tao/RT_Policy_i.cpp
index eca70415e49..ea54995ff96 100644
--- a/TAO/tao/RT_Policy_i.cpp
+++ b/TAO/tao/RT_Policy_i.cpp
@@ -548,7 +548,7 @@ TAO_ClientProtocolPolicy::_tao_encode (TAO_OutputCDR &out_cdr)
i++)
{
is_write_ok =
- (out_cdr << protocols_[i].protocol_type)
+ (out_cdr << this->protocols_[i].protocol_type)
&&
this->protocols_[i].orb_protocol_properties->_tao_encode (out_cdr)
&&
@@ -563,34 +563,31 @@ TAO_ClientProtocolPolicy::_tao_decode (TAO_InputCDR &in_cdr)
{
CORBA::ULong length;
CORBA::Boolean is_read_ok = in_cdr >> length;
-
+
this->protocols_.length (length);
- RTCORBA::ProtocolProperties *protocol_properties;
for (CORBA::ULong i = 0; (i < length) && is_read_ok; i++)
{
- IOP::ProfileId id;
- is_read_ok = in_cdr >> id;
+ is_read_ok = in_cdr >> this->protocols_[i].protocol_type;
- protocol_properties =
- TAO_Protocol_Properties_Factory::create_orb_protocol_property (id);
+ this->protocols_[i].orb_protocol_properties =
+ TAO_Protocol_Properties_Factory::create_orb_protocol_property
+ (this->protocols_[i].protocol_type);
this->protocols_[i].transport_protocol_properties =
- TAO_Protocol_Properties_Factory::create_transport_protocol_property (id);
-
- if (is_read_ok && protocol_properties != 0 )
- {
- this->protocols_[i].orb_protocol_properties = protocol_properties;
-
- if (is_read_ok && (this->protocols_[i].orb_protocol_properties.ptr () == 0))
- is_read_ok =
- this->protocols_[i].orb_protocol_properties->_tao_decode (in_cdr);
-
- if (is_read_ok
- && (this->protocols_[i].transport_protocol_properties.ptr () == 0))
- is_read_ok =
- this->protocols_[i].transport_protocol_properties->_tao_decode (in_cdr);
- }
+ TAO_Protocol_Properties_Factory::create_transport_protocol_property
+ (this->protocols_[i].protocol_type);
+
+ if (is_read_ok
+ && (this->protocols_[i].orb_protocol_properties.ptr () == 0))
+ is_read_ok =
+ this->protocols_[i].orb_protocol_properties->_tao_decode (in_cdr);
+
+ if (is_read_ok
+ && (this->protocols_[i].transport_protocol_properties.ptr () == 0))
+ is_read_ok =
+ this->protocols_[i].transport_protocol_properties->_tao_decode (in_cdr);
+
}
return is_read_ok;
@@ -605,6 +602,20 @@ TAO_GIOP_Properties::~TAO_GIOP_Properties (void)
{
}
+CORBA::Boolean
+TAO_GIOP_Properties::_tao_encode (TAO_OutputCDR &out_cdr)
+{
+ ACE_UNUSED_ARG (out_cdr);
+ return 1;
+}
+
+CORBA::Boolean
+TAO_GIOP_Properties::_tao_decode (TAO_InputCDR &in_cdr)
+{
+ ACE_UNUSED_ARG (in_cdr);
+ return 1;
+}
+
// ****************************************************************
RTCORBA::ProtocolProperties*
diff --git a/TAO/tao/RT_Policy_i.h b/TAO/tao/RT_Policy_i.h
index d70e6e0ea0b..d4cc228bc04 100644
--- a/TAO/tao/RT_Policy_i.h
+++ b/TAO/tao/RT_Policy_i.h
@@ -500,6 +500,12 @@ class TAO_Export TAO_GIOP_Properties :
public:
virtual ~TAO_GIOP_Properties ();
+ // = CDR encoding methods
+
+ virtual CORBA::Boolean _tao_encode (TAO_OutputCDR &out_cdr);
+
+ virtual CORBA::Boolean _tao_decode (TAO_InputCDR &in_cdr);
+
// = Override CORBA::LocalObject no-op methods to
// provide reference counting.
diff --git a/TAO/tao/Stub.cpp b/TAO/tao/Stub.cpp
index 57996e51df0..bcf5a048cb1 100644
--- a/TAO/tao/Stub.cpp
+++ b/TAO/tao/Stub.cpp
@@ -629,7 +629,7 @@ TAO_Stub::exposed_priority_banded_connection (void)
RTCORBA::PriorityBandedConnectionPolicy *pbc_policy = 0;
pbc_policy =
- RTCORBA::PriorityBandedConnectionPolicy::_narrow (pbc_policy);
+ RTCORBA::PriorityBandedConnectionPolicy::_narrow (policy);
if (!CORBA::is_nil (pbc_policy))
{
@@ -665,7 +665,7 @@ TAO_Stub::exposed_client_protocol (void)
RTCORBA::ClientProtocolPolicy *cp_policy = 0;
cp_policy =
- RTCORBA::ClientProtocolPolicy::_narrow (cp_policy);
+ RTCORBA::ClientProtocolPolicy::_narrow (policy);
if (!CORBA::is_nil (cp_policy))
{