[omniORB] Possible bug: omniORBpyPR2 / omniORB3.0: objref unmarshalling
Duncan Grisby
dgrisby@uk.research.att.com
Tue, 14 Mar 2000 10:50:37 +0000
On Tuesday 14 March, Will Mitchell wrote:
> I discovered what may be a problem in the way that object references are
> unmarshalled and communicated to Python. The problem is demonstrated with a
> simple script:
It is indeed a bug, and your interpretation of the problem was
correct. Update from CVS or apply the following patch.
Thanks for the bug report,
Duncan.
diff -u -r1.17 pyMarshal.cc
--- modules/common/pyMarshal.cc 2000/03/03 17:41:43 1.17
+++ modules/common/pyMarshal.cc 2000/03/14 10:42:39
@@ -1791,8 +1791,13 @@
else {
OMNIORB_ASSERT(PyString_Check(t_o));
targetRepoId = PyString_AS_STRING(t_o);
- if (targetRepoId[0] == '\0') // Empty string => CORBA.Object
+ if (targetRepoId[0] == '\0') { // Empty string => CORBA.Object
+#ifdef OMNIORBPY_FOR_28
targetRepoId = 0;
+#else
+ targetRepoId = CORBA::Object::_PD_repoId;
+#endif
+ }
}
CORBA::Object_ptr obj = omniPy::UnMarshalObjRef(targetRepoId,
@@ -2227,8 +2232,13 @@
else {
OMNIORB_ASSERT(PyString_Check(t_o));
targetRepoId = PyString_AS_STRING(t_o);
- if (targetRepoId[0] == '\0') // Empty string => CORBA.Object
+ if (targetRepoId[0] == '\0') { // Empty string => CORBA.Object
+#ifdef OMNIORBPY_FOR_28
targetRepoId = 0;
+#else
+ targetRepoId = CORBA::Object::_PD_repoId;
+#endif
+ }
}
CORBA::Object_ptr obj = omniPy::UnMarshalObjRef(targetRepoId,
--
-- Duncan Grisby \ Research Engineer --
-- AT&T Laboratories Cambridge --
-- http://www.uk.research.att.com/~dpg1 --