diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-03-30 16:38:05 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-03-30 16:38:05 +0000 |
commit | 5af7c61184ca2bde839b5ae6e0e1cedb2f8c60d2 (patch) | |
tree | 943fc2af18934849b49f011e6d2c869e8fd1c9df /TAO/tao/IIOP_ORB.cpp | |
parent | 0dcf1e45b7f68badbf73fe94131179d47c82e0a5 (diff) | |
download | ATCD-5af7c61184ca2bde839b5ae6e0e1cedb2f8c60d2.tar.gz |
ChangeLogTag:Mon Mar 30 10:28:05 1998 Carlos O'Ryan <coryan@cs.wustl.edu>
Diffstat (limited to 'TAO/tao/IIOP_ORB.cpp')
-rw-r--r-- | TAO/tao/IIOP_ORB.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/TAO/tao/IIOP_ORB.cpp b/TAO/tao/IIOP_ORB.cpp index 0f59b9c3c36..1e51012399a 100644 --- a/TAO/tao/IIOP_ORB.cpp +++ b/TAO/tao/IIOP_ORB.cpp @@ -37,17 +37,15 @@ IIOP_ORB::object_to_string (CORBA::Object_ptr obj, // XXX there should be a simple way to reuse this code in other // ORB implementations ... - char *bytes; // @@ Is BUFSIZ the right size here? char buf [BUFSIZ]; - CDR cdr (buf, sizeof buf, TAO_ENCAP_BYTE_ORDER); + TAO_OutputCDR cdr (buf, sizeof buf, TAO_ENCAP_BYTE_ORDER); - bytes = buf; // support limited oref ACE_OS::strcmp. - (void) ACE_OS::memset (bytes, 0, BUFSIZ); + (void) ACE_OS::memset (buf, 0, BUFSIZ); // Marshal the objref into an encapsulation bytestream. - (void) cdr.put_char (TAO_ENCAP_BYTE_ORDER); + (void) cdr.write_octet (TAO_ENCAP_BYTE_ORDER); if (cdr.encode (CORBA::_tc_Object, &obj, 0, env) != CORBA::TypeCode::TRAVERSE_CONTINUE) @@ -63,7 +61,7 @@ IIOP_ORB::object_to_string (CORBA::Object_ptr obj, ACE_OS::strcpy ((char *) string, ior_prefix); - bytes = cdr.buffer (); + const char* bytes = cdr.buffer (); for (cp = (CORBA::String) ACE_OS::strchr ((char *) string, ':') + 1; len--; @@ -184,13 +182,12 @@ ior_string_to_object (CORBA::String str, // Create deencapsulation stream ... then unmarshal objref from that // stream. - CDR stream; - CORBA::Object_ptr objref; + TAO_InputCDR stream (buffer + 1, len - 1, buffer[0]); - stream.setup_encapsulation (buffer, len); + CORBA::Object_ptr objref; if (stream.decode (CORBA::_tc_Object, - &objref, 0, - env) != CORBA::TypeCode::TRAVERSE_CONTINUE) + &objref, 0, + env) != CORBA::TypeCode::TRAVERSE_CONTINUE) objref = 0; delete [] buffer; |