[omniORB] Possible bug in omniidl regarding _PD_repoId?
Duncan Grisby
duncan at grisby.org
Mon Oct 29 10:21:50 GMT 2012
On Mon, 2012-10-29 at 10:32 +0100, Tarjei Knapstad wrote:
[...]
> moduleInlineSK.cc:const char* MyModule::MyInterface::_PD_repoId =
> "IDL:MyModule/MyInterface:1.0";
>
> The latter is what IIOP.Net asks for when trying to obtain a object
> reference. Is this a bug in how omniidl treats include directives?
No, it's a bug in IIOP.Net. omniidl is correct in not including the
"MyModule" within the repository id. See section 10.6.5.2 of the CORBA
2.6 specification:
...
The specified prefix applies to RepositoryIds generated after
the pragma until the end of the current scope is reached or
another prefix pragma is encountered. An IDL file forms a scope
for this purpose, so a prefix resets to the previous prefix at
the end of the scope of an included file:
...
If an included file does not contain a #pragma prefix, the
current prefix implicitly resets to the empty prefix:
// E.idl
interface E {};
// F.idl
module M {
#include <E.idl>
};
The repository IDs for module M and interface E in this case
are:
IDL:M:1.0
IDL:E:1.0
As a work-around for the bug in IIOP.net, you can use #pragma prefix
"MyModule" at the start of myInterface.idl, which will mean that omniidl
uses the repository id that IIOP.net incorrectly thinks it should have.
Cheers,
Duncan.
--
-- Duncan Grisby --
-- duncan at grisby.org --
-- http://www.grisby.org --
More information about the omniORB-list
mailing list