[omniORB] Re: [OB-Users] Orbacus Names and omniORB interoperability

Duncan Grisby dgrisby@uk.research.att.com
Tue, 07 Mar 2000 11:39:17 +0000


On Monday 6 March, Marc Laukien wrote:

> > type_id: IDL:ooc.com/CosNaming/OBNamingContext:1.0

[...]

> Note that OBNamingContext is derived from NamingContextExt, which is
> derived from NamingContext. This is a perfectly legal thing to do.

This is a really silly bug in omniORB 2. The following patch for
omniORB 2.8 fixes it. If you have an earlier version of omniORB, it
should be easy to fix the equivalent code. omniORB 3 doesn't have the
bug.

The fix is in CVS, and will appear in tomorrow's FTP snapshot. 

Cheers,

Duncan.


Index: initFile.cc
===================================================================
RCS file: /project/omni/cvsroot/omni/src/lib/omniORB2/orbcore/initFile.cc,v
retrieving revision 1.30
diff -u -r1.30 initFile.cc
--- initFile.cc	1999/09/01 13:13:55	1.30
+++ initFile.cc	2000/03/07 11:20:58
@@ -271,20 +271,11 @@
 	      omniObject* objptr = omni::stringToObject(data);
 	      NameService = (CORBA::Object_ptr) 
 		                objptr->_widenFromTheMostDerivedIntf(0);
-	      
 	    }
 	  catch(const CORBA::MARSHAL&)
 	    {
 	      invref(entryname);
 	    }
-
-	  if((NameService->PR_getobj()->_widenFromTheMostDerivedIntf(
-				  CosNaming_NamingContext_IntfRepoID)) == 0)
-	    {
-	      // The object reference supplied is not for the NamingService
-	      
-	      invref(entryname);
-	    }
 	  omniInitialReferences::singleton()->set("NameService",NameService);
 	}
       else if (strcmp(entryname, "INTERFACE_REPOSITORY") == 0)
@@ -297,24 +288,11 @@
 	      omniObject* objptr = omni::stringToObject(data);
 	      InterfaceRepository = (CORBA::Object_ptr)
 		objptr->_widenFromTheMostDerivedIntf(0);
-	      
 	    }
 	  catch(const CORBA::MARSHAL&)
 	    {
 	      invref(entryname);
 	    }
-#if 0
-	  // Doing this test would make the orbcore dependent on the
-	  // dynamic library.
-	  if((InterfaceRepository->PR_getobj()->_widenFromTheMostDerivedIntf(
-				     CORBA_Repository_IntfRepoID)) == 0)
-	    {
-	      // The object reference supplied is not for the interface 
-	      // repository
-	      
-	      invref(entryname);
-	    }    
-#endif
 	  omniInitialReferences::singleton()->set("InterfaceRepository",
 						  InterfaceRepository);
 	}


-- 
 -- Duncan Grisby  \  Research Engineer  --
  -- AT&T Laboratories Cambridge          --
   -- http://www.uk.research.att.com/~dpg1 --