summaryrefslogtreecommitdiff
path: root/TAO/tao/append.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/append.cpp')
-rw-r--r--TAO/tao/append.cpp63
1 files changed, 30 insertions, 33 deletions
diff --git a/TAO/tao/append.cpp b/TAO/tao/append.cpp
index 36d2277a63d..0eca9668080 100644
--- a/TAO/tao/append.cpp
+++ b/TAO/tao/append.cpp
@@ -90,7 +90,7 @@ TAO_Marshal_Primitive::append (CORBA::TypeCode_ptr tc,
if (TAO_debug_level > 0)
ACE_DEBUG ((LM_DEBUG,
"TAO_Marshal_Primitive::append detected error\n"));
- env.exception (new CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_MAYBE));
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
return CORBA::TypeCode::TRAVERSE_STOP;
}
}
@@ -119,11 +119,8 @@ TAO_Marshal_Any::append (CORBA::TypeCode_ptr,
// encode the typecode
retval = dest->encode (CORBA::_tc_TypeCode, &elem_tc, 0, env);
if (retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
- {
- // append the data
- retval = dest->append (elem_tc, src, env);
- CORBA::release (elem_tc);
- }
+ // append the data
+ retval = dest->append (elem_tc, src, env);
}
if (retval != CORBA::TypeCode::TRAVERSE_CONTINUE)
{
@@ -131,7 +128,7 @@ TAO_Marshal_Any::append (CORBA::TypeCode_ptr,
ACE_DEBUG ((LM_DEBUG,
"TAO_Marshal_Any::append detected error\n"));
CORBA::release (elem_tc);
- env.exception (new CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_MAYBE));
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
}
return retval;
}
@@ -205,7 +202,7 @@ TAO_Marshal_TypeCode::append (CORBA::TypeCode_ptr,
ACE_DEBUG ((LM_DEBUG,
"TAO_Marshal_TypeCode: "
"Bad kind_ value in CDR stream\n"));
- env.exception (new CORBA::BAD_TYPECODE ());
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
return CORBA::TypeCode::TRAVERSE_STOP;
}
}
@@ -218,7 +215,7 @@ TAO_Marshal_TypeCode::append (CORBA::TypeCode_ptr,
if (TAO_debug_level > 0)
ACE_DEBUG ((LM_DEBUG,
"TAO_Marshal_TypeCode::append detected error\n"));
- env.exception (new CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_MAYBE));
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
return CORBA::TypeCode::TRAVERSE_STOP;
}
}
@@ -296,7 +293,7 @@ TAO_Marshal_ObjRef::append (CORBA::TypeCode_ptr,
{
if (TAO_debug_level > 0)
ACE_DEBUG ((LM_DEBUG, "TAO_Marshal_ObjRef::append detected error\n"));
- env.exception (new CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_MAYBE));
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
return CORBA::TypeCode::TRAVERSE_STOP;
}
}
@@ -342,7 +339,7 @@ TAO_Marshal_Struct::append (CORBA::TypeCode_ptr tc,
if (TAO_debug_level > 0)
ACE_DEBUG ((LM_DEBUG,
"TAO_Marshal_Struct::encode detected error\n"));
- env.exception (new CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_MAYBE));
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
return CORBA::TypeCode::TRAVERSE_STOP;
}
}
@@ -398,7 +395,7 @@ TAO_Marshal_Union::append (CORBA::TypeCode_ptr tc,
member_label = tc->member_label (i, env);
if (env.exception () == 0)
{
- CORBA::TypeCode_var type = member_label->type ();
+ CORBA::TypeCode_var type = member_label->type ();
// do the matching
switch (type->kind (env))
{
@@ -437,7 +434,9 @@ TAO_Marshal_Union::append (CORBA::TypeCode_ptr tc,
case CORBA::tk_enum:
{
CORBA::Long l;
- TAO_InputCDR stream (member_label->_tao_get_cdr ());
+ TAO_InputCDR stream ((ACE_Message_Block *)
+ member_label->value
+ ());
(void)stream.decode (discrim_tc, &l, 0, env);
if (l == *(CORBA::Long *) &discrim_val)
discrim_matched = 1;
@@ -452,12 +451,10 @@ TAO_Marshal_Union::append (CORBA::TypeCode_ptr tc,
}
break;
case CORBA::tk_wchar:
- {
- CORBA::WChar wc;
- *member_label >>= CORBA::Any::to_wchar (wc);
- if (wc == *(CORBA::WChar *) &discrim_val)
- discrim_matched = 1;
- }
+ // @@ ASG TO-DO
+ if (*(CORBA::WChar *) member_label->value ()
+ == *(CORBA::WChar *) &discrim_val)
+ discrim_matched = 1;
break;
case CORBA::tk_boolean:
{
@@ -468,7 +465,7 @@ TAO_Marshal_Union::append (CORBA::TypeCode_ptr tc,
}
break;
default:
- env.exception (new CORBA::BAD_TYPECODE ());
+ env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO));
return CORBA::TypeCode::TRAVERSE_STOP;
}// end of switch
@@ -489,13 +486,13 @@ TAO_Marshal_Union::append (CORBA::TypeCode_ptr tc,
}
else
{
- env.exception (new CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_MAYBE));
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else
{
- env.exception (new CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_MAYBE));
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
return CORBA::TypeCode::TRAVERSE_STOP;
}
} // end of for loop
@@ -509,31 +506,31 @@ TAO_Marshal_Union::append (CORBA::TypeCode_ptr tc,
}
else
{
- env.exception (new CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_MAYBE));
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else
{
- env.exception (new CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_MAYBE));
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else
{
- env.exception (new CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_MAYBE));
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else
{
- env.exception (new CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_MAYBE));
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
return CORBA::TypeCode::TRAVERSE_STOP;
}
}
else
{
- env.exception (new CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_MAYBE));
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
return CORBA::TypeCode::TRAVERSE_STOP;
}
}
@@ -563,7 +560,7 @@ TAO_Marshal_String::append (CORBA::TypeCode_ptr,
if (TAO_debug_level > 0)
ACE_DEBUG ((LM_DEBUG,
"TAO_Marshal_TypeCode::append detected error"));
- env.exception (new CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_MAYBE));
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
return CORBA::TypeCode::TRAVERSE_STOP;
}
}
@@ -614,7 +611,7 @@ TAO_Marshal_Sequence::append (CORBA::TypeCode_ptr tc,
if (TAO_debug_level > 0)
ACE_DEBUG ((LM_DEBUG,
"marshaling TAO_Marshal_Sequence::append detected error\n"));
- env.exception (new CORBA::MARSHAL ());
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_NO));
return CORBA::TypeCode::TRAVERSE_STOP;
}
@@ -659,7 +656,7 @@ TAO_Marshal_Array::append (CORBA::TypeCode_ptr tc,
if (TAO_debug_level > 0)
ACE_DEBUG ((LM_DEBUG,
"TAO_Marshal_Sequence::append detected error"));
- env.exception (new CORBA::MARSHAL ());
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_NO));
return CORBA::TypeCode::TRAVERSE_STOP;
}
@@ -693,7 +690,7 @@ TAO_Marshal_Alias::append (CORBA::TypeCode_ptr tc,
if (TAO_debug_level > 0)
ACE_DEBUG ((LM_DEBUG,
"TAO_Marshal_Alias::append detected error\n"));
- env.exception (new CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_MAYBE));
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
return CORBA::TypeCode::TRAVERSE_STOP;
}
}
@@ -747,7 +744,7 @@ TAO_Marshal_Except::append (CORBA::TypeCode_ptr tc,
if (TAO_debug_level > 0)
ACE_DEBUG ((LM_DEBUG,
"TAO_Marshal_Except::append detected error\n"));
- env.exception (new CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_MAYBE));
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
return CORBA::TypeCode::TRAVERSE_STOP;
}
}
@@ -778,7 +775,7 @@ TAO_Marshal_WString::append (CORBA::TypeCode_ptr,
if (TAO_debug_level > 0)
ACE_DEBUG ((LM_DEBUG,
"TAO_Marshal_WString::append detected error\n"));
- env.exception (new CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_MAYBE));
+ env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
return CORBA::TypeCode::TRAVERSE_STOP;
}
}