*** omniORB_2.5.0/src/lib/omniORB2/any.cc Tue Jan 27 15:47:08 1998 --- new/src/lib/omniORB2/any.cc Mon Aug 10 20:01:40 1998 *************** *** 83,95 **** if (release) delete[] _val; } ! else if (!tc->NP_expandEqual(CORBA::_tc_null,1) && ! !tc->NP_expandEqual(CORBA::_tc_void,1)) ! { ! CORBA::release(pd_tc); ! pd_tc = 0; ! throw CORBA::BAD_PARAM(0,CORBA::COMPLETED_NO); ! } } --- 83,92 ---- if (release) delete[] _val; } ! else { ! // value == 0, If the typecode is not _tc_null or _tc_void, this ! // any is partially initialised with only the typecode and no value. ! } } *************** *** 157,162 **** --- 154,161 ---- CORBA::tk_string) fillerLen = (pd_tc->pd_param).alreadyWritten() % 4; + MemBufferedStream tmpInBuf(pd_mbuf,1); + #if !defined(NO_FLOAT) if ((pd_tc->pd_tck == CORBA::tk_double || pd_tc->pd_tck == CORBA::tk_any || pd_tc->pd_tck == CORBA::tk_struct || pd_tc->pd_tck == CORBA::tk_union || *************** *** 164,170 **** s.WrMessageAlreadyWritten()%8 > 0 && s.WrMessageAlreadyWritten()%8 <= 4) { MemBufferedStream outBuf; - MemBufferedStream tmpInBuf(pd_mbuf,1); PR_fill(fillerLen,outBuf); tmpInBuf.skip(fillerLen); --- 163,168 ---- *************** *** 179,187 **** else #endif { ! s.put_char_array((_CORBA_Char*) (omni::ptr_arith_t) pd_mbuf.data() + (omni::ptr_arith_t) fillerLen, ! pd_mbuf.alreadyWritten() - fillerLen); } } --- 177,185 ---- else #endif { ! s.put_char_array((_CORBA_Char*) (omni::ptr_arith_t) tmpInBuf.data() + (omni::ptr_arith_t) fillerLen, ! tmpInBuf.alreadyWritten() - fillerLen); } } *************** *** 205,210 **** --- 203,209 ---- if (pd_tc->pd_tck > CORBA::tk_Principal && pd_tc->pd_tck != CORBA::tk_string) fillerLen = (pd_tc->pd_param).alreadyWritten() % 4; + MemBufferedStream tmpInBuf(pd_mbuf,1); #if !defined(NO_FLOAT) if ((pd_tc->pd_tck == CORBA::tk_double || pd_tc->pd_tck == CORBA::tk_any || *************** *** 212,218 **** pd_tc->pd_tck > CORBA::tk_string) && m.alreadyWritten()%8 > 0 && m.alreadyWritten()%8 <= 4) { - MemBufferedStream tmpInBuf(pd_mbuf,1); tmpInBuf.skip(fillerLen); tcParseEngine tcEngine(pd_tc,&tmpInBuf); --- 211,216 ---- *************** *** 221,229 **** else #endif { ! m.put_char_array((_CORBA_Char*) (omni::ptr_arith_t) pd_mbuf.data() + (omni::ptr_arith_t) fillerLen, ! pd_mbuf.alreadyWritten() - fillerLen); } } --- 219,227 ---- else #endif { ! m.put_char_array((_CORBA_Char*) (omni::ptr_arith_t) tmpInBuf.data() + (omni::ptr_arith_t) fillerLen, ! tmpInBuf.alreadyWritten() - fillerLen); } } *************** *** 527,540 **** tcEngine.parse(dbuf); if (release) delete[] _val; } ! else if (!tc->NP_expandEqual(CORBA::_tc_null,1) && ! !tc->NP_expandEqual(CORBA::_tc_void,1)) ! { ! CORBA::release(pd_tc); ! pd_tc = 0; ! throw CORBA::BAD_PARAM(0,CORBA::COMPLETED_NO); ! } ! pd_mbuf = dbuf; } --- 525,534 ---- tcEngine.parse(dbuf); if (release) delete[] _val; } ! else { ! // value == 0, If the typecode is not _tc_null or _tc_void, this ! // any is partially initialised with only the typecode and no value. ! } pd_mbuf = dbuf; }