[omniORB] Wide string problems talking to Visibroker 4.5
Duncan Grisby
dgrisby@uk.research.att.com
Mon, 30 Jul 2001 11:41:42 +0100
On Monday 30 July, Duncan Grisby wrote:
> As an experiment, can you try this patch and see if it makes
> Visibroker happy?
Oops. That's wrong. Try this one:
Index: src/lib/omniORB/orbcore/cs-UTF-16.cc
===================================================================
RCS file: /project/omni/cvsroot/omni/src/lib/omniORB/orbcore/Attic/cs-UTF-16.cc,v
retrieving revision 1.1.2.8
diff -u -r1.1.2.8 cs-UTF-16.cc
--- src/lib/omniORB/orbcore/cs-UTF-16.cc 2001/07/26 16:37:20 1.1.2.8
+++ src/lib/omniORB/orbcore/cs-UTF-16.cc 2001/07/30 10:41:30
@@ -258,6 +258,7 @@
// Just to be different, wstring is marshalled without a terminating
// null. Length is in octets.
_CORBA_ULong mlen = (len+1) * 2; // len + 1 for BOM
+ mlen += 2; // *** HACK! Testing Visibrokenness
mlen >>= stream;
// Send a suitable BOM so that we can marshal with native endian,
@@ -269,6 +270,7 @@
_CORBA_UShort tc = 0xfeff; tc >>= stream;
}
stream.put_octet_array((const _CORBA_Octet*)us, mlen-2, omni::ALIGN_2);
+ _CORBA_UShort nul = 0; nul >>= stream; // HACK! Testing Visibrokenness
}
--
-- Duncan Grisby \ Research Engineer --
-- AT&T Laboratories Cambridge --
-- http://www.uk.research.att.com/~dpg1 --