[omniORB] CORBA::Any::NP_marshalDataOnly assertion failure
Peter S. Housel
housel at acm.org
Tue Nov 27 14:27:27 GMT 2007
On Tue, 2007-11-27 at 12:02 -0800, Peter Housel wrote:
> Alternatively, maybe
> the second branch should be "else if (a.pd_marshal) {" rather than
> "else if (a.pd_data) {".
The patch below works for me:
Index: any.cc
===================================================================
RCS file: /cvsroot/omniorb/omni/src/lib/omniORB/dynamic/Attic/any.cc,v
retrieving revision 1.21.2.9
diff -u -u -r1.21.2.9 any.cc
--- any.cc 26 Nov 2007 16:14:35 -0000 1.21.2.9
+++ any.cc 27 Nov 2007 22:23:37 -0000
@@ -267,13 +267,11 @@
if (a.pd_mbuf) {
pd_mbuf = new cdrAnyMemoryStream(*a.pd_mbuf);
}
- else if (a.pd_data) {
+ else if (a.pd_marshal) {
// Existing Any has data in its void* pointer. Rather than trying
// to copy that (which would require a copy function to be
// registered along with the marshal and destructor functions), we
// marshal the data into a memory buffer.
- OMNIORB_ASSERT(a.pd_marshal);
-
pd_mbuf = new cdrAnyMemoryStream;
a.pd_marshal(*pd_mbuf, a.pd_data);
}
@@ -294,14 +292,10 @@
if (a.pd_mbuf) {
pd_mbuf = new cdrAnyMemoryStream(*a.pd_mbuf);
}
- else if (a.pd_data) {
- OMNIORB_ASSERT(a.pd_marshal);
+ else if (a.pd_marshal) {
pd_mbuf = new cdrAnyMemoryStream;
a.pd_marshal(*pd_mbuf, a.pd_data);
}
- else {
- pd_mbuf = 0;
- }
}
return *this;
}
More information about the omniORB-list
mailing list