[omniORB] Orbix 3.0 v.s omniORB2.8

Sai-Lai Lo S.Lo@uk.research.att.com
08 Oct 1999 15:03:31 +0100


>>>>> Carlson, Andy writes:

> I dont know if Iona have a patch for this. If not, waiting for one
> would be 'doing the right thing' but could take a while!

> Would it not be possible to put a workaround for this into
> omniORB (presumably with #ifdefs around it), as was done
> for the dodgy null references from early versions of Visibroker?

Sigh! If anyone is desperate, one could modify
top/src/lib/omniORB2/orbcore/giopServer.cc to something like this.

No, it is not going into the master source. This hack is bordering on
absurdity... 

void
GIOP_S::HandleRequest(CORBA::Boolean byteorder)
{
   ....
   CORBA::ULong keysize;
   keysize <<= *this;
   if (keysize == sizeof(omniObjectKey)) {
     get_char_array((CORBA::Char*) &pd_objkey, keysize);
   }
#if 1 
   else if (keysize == (sizeof(omniObjectKey) + 1)) {
      // XXX Hack!!
      // Seems to be a known bug with Orbix 3 client.
      // It presents a 13-bytes key even though it is given an object
      // reference with 12-bytes key.
      // May be the first 12 bytes contains the correct key.
     get_char_array((CORBA::Char*) &pd_objkey, sizeof(omniObjectKey));
     skip(1);
     keysize = sizeof(omniObjectKey);
   }
#endif
   else {
     // This key did not come from this orb.
     // silently skip the key. Initialise pd_objkey to all zeros and
     // let the call to locateObject() below to raise the proper exception
    ...
--------------------------- 
void
GIOP_S::HandleLocateRequest(CORBA::Boolean byteorder)
{
   ....
   // XXX Hacked! Try to workaround a known bug with Orbix 3 client.
   // 
   if (keysize > (sizeof(omniObjectKey)+1)) {
     // This key did not come from this orb.
     // silently skip the key. Initialise pd_objkey to all zeros and
     // let the call to locateObject() below to raise the proper exception
     pd_objkey = omniORB::nullkey();
     skip(keysize);
   }
   else {
     get_char_array((CORBA::Char*) &pd_objkey, sizeof(omniObjectKey));
     if (keysize == (sizeof(omniObjectKey)+1)) {
        skip(1);
        keysize = sizeof(omniObjectKey);
     }
   }
   ....


-- 
Sai-Lai Lo                                   S.Lo@uk.research.att.com
AT&T Laboratories Cambridge           WWW:   http://www.uk.research.att.com 
24a Trumpington Street                Tel:   +44 1223 343000
Cambridge CB2 1QA                     Fax:   +44 1223 313542
ENGLAND