summaryrefslogtreecommitdiff
path: root/TAO/tao/NVList.cpp
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-01-30 02:15:33 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-01-30 02:15:33 +0000
commit384fa09383fb11345982c28c40b855ea1e87fe79 (patch)
tree0a01b83634b988a74b4d96a5ca217340183a332d /TAO/tao/NVList.cpp
parent2f8ce7359d91b891b3d73e11de5e57a64ca95bc4 (diff)
downloadATCD-384fa09383fb11345982c28c40b855ea1e87fe79.tar.gz
*** empty log message ***
Diffstat (limited to 'TAO/tao/NVList.cpp')
-rw-r--r--TAO/tao/NVList.cpp21
1 files changed, 6 insertions, 15 deletions
diff --git a/TAO/tao/NVList.cpp b/TAO/tao/NVList.cpp
index fb7b8b40fb6..673f070fd56 100644
--- a/TAO/tao/NVList.cpp
+++ b/TAO/tao/NVList.cpp
@@ -123,21 +123,12 @@ CORBA_NVList::add_value (const char *name,
{
// now initialize the fields
nv->name_ = CORBA::string_dup (name);
- if (ACE_BIT_ENABLED (flags, CORBA::IN_COPY_VALUE))
- // IN_COPY_VALUE means that the parameter is not "borrowed" by
- // the ORB, but rather that the ORB copies its value.
- //
- // Initialize the newly allocated memory using a copy
- // constructor that places the new "Any" value at just the
- // right place, and makes a "deep copy" of the data.
- nv->any_ = value;
- else
- {
- // The normal behavior for parameters is that the ORB
- // "borrows" their memory for the duration of calls.
- CORBA::TypeCode_var type = value.type ();
- nv->any_.replace (type.in (), value.value_, 0, env);
- }
+ nv->any_ = value;
+ // We ignore the CORBA::IN_COPY_VALUE flag here because
+ // the value (void*) of the Any may be 0, in which case
+ // the ORB must copy the value anyway. Calling replace()
+ // with a 0 void* will cause a crash when replace() tries
+ // to encode the null pointer into a CDR stream.
return nv;
}