summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>2003-04-24 03:13:10 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>2003-04-24 03:13:10 +0000
commitc1f0e5f83d0c934af51aab789a1f1285a4ed610b (patch)
tree5e24352894e0f87140708984021f8676914776f3
parent9b4e1429b8c19d7b9aaa5254ea87214ade3782ce (diff)
downloadATCD-c1f0e5f83d0c934af51aab789a1f1285a4ed610b.tar.gz
ChangeLogTag:Wed Apr 23 22:12:37 2003 Ossama Othman <ossama@dre.vanderbilt.edu>
-rw-r--r--TAO/ChangeLog15
-rw-r--r--TAO/tao/CDR_Encaps_Codec.cpp18
-rw-r--r--TAO/tao/PortableServer/POA.cpp12
3 files changed, 38 insertions, 7 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 465a109723c..6b1ed3c938b 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,18 @@
+Wed Apr 23 22:12:37 2003 Ossama Othman <ossama@dre.vanderbilt.edu>
+
+ * tao/CDR_Encaps_Codec.cpp (encode_value):
+
+ If the internal ACE_Message_Block in the supplied Any is null,
+ explicitly create an ACE_Message_Block and populate with the
+ marshalled data. Fixes run-time errors in the Codec and
+ IORInterceptor tests. Thanks to Jeff for providing a fix.
+
+ * tao/PortableServer/POA.cpp (TAO_POA, create_POA_i):
+
+ Reverted one more change from fix described in "Wed Apr 23
+ 18:06:48 2003 Ossama Othman <ossama@dre.vanderbilt.edu>".
+ Fixes a remaining problem in the IORInterceptor test.
+
Wed Apr 23 18:27:53 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
* TAO_IDL/be/be_visitor_sequence/cdr_op_cs.cpp:
diff --git a/TAO/tao/CDR_Encaps_Codec.cpp b/TAO/tao/CDR_Encaps_Codec.cpp
index 163a92334b4..b6c4df58c10 100644
--- a/TAO/tao/CDR_Encaps_Codec.cpp
+++ b/TAO/tao/CDR_Encaps_Codec.cpp
@@ -163,7 +163,23 @@ TAO_CDR_Encaps_Codec::encode_value (const CORBA::Any & data
{
CORBA::TypeCode_var tc = data.type ();
- TAO_InputCDR input (data._tao_get_cdr (),
+ ACE_Message_Block * mb = data._tao_get_cdr ();
+
+ if (mb == 0)
+ {
+ ACE_NEW_THROW_EX (mb,
+ ACE_Message_Block,
+ CORBA::NO_MEMORY ());
+ ACE_CHECK_RETURN (0);
+
+ TAO_OutputCDR out;
+ CORBA::Any any (data);
+ any.impl ()->marshal_value (out);
+
+ ACE_CDR::consolidate (mb, out.begin ());
+ }
+
+ TAO_InputCDR input (mb,
data._tao_byte_order (),
this->major_,
this->minor_,
diff --git a/TAO/tao/PortableServer/POA.cpp b/TAO/tao/PortableServer/POA.cpp
index dc12bc2c98b..6c366740c15 100644
--- a/TAO/tao/PortableServer/POA.cpp
+++ b/TAO/tao/PortableServer/POA.cpp
@@ -354,6 +354,12 @@ TAO_POA::TAO_POA (const TAO_POA::String &name,
// descrease it upon destruction.
CORBA::add_ref (this->ort_template_.in ());
this->obj_ref_factory_ = this->ort_template_;
+
+ // Iterate over the registered IOR interceptors so that they may be
+ // given the opportunity to add tagged components to the profiles
+ // for this servant.
+ this->establish_components (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
}
TAO_POA::~TAO_POA (void)
@@ -571,12 +577,6 @@ TAO_POA::create_POA_i (const TAO_POA::String &adapter_name,
0);
}
- // Iterate over the registered IOR interceptors so that they may be
- // given the opportunity to add tagged components to the profiles
- // for this servant.
- poa->establish_components (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
// Note: Creating a POA using a POA manager that is in the active
// state can lead to race conditions if the POA supports preexisting
// objects, because the new POA may receive a request before its