Re: i got a question about naming service



Hi Folke,

On Wed, 2002-12-25 at 07:47, folke@sina.com.cn wrote:
>   CosNaming_NameComponent   name_component[3] = { {"Linux",  "subcontext"},
>                                 {"Server", "subcontext"},
>                                 {"Driver", "server"} };
>   CosNaming_Name name = {3, 3, name_component, CORBA_FALSE};

...

>   CosNaming_NamingContext_bind(nameServer, &name, obj_routerDriver, ev);
>   if (ev->_major != CORBA_NO_EXCEPTION) {
>    fprintf (stderr, "Error: could register object: %s\n", CORBA_exception_id(ev));
>       exit (-1);
>   }

	Presumably [ and I really never use the naming server so I have no idea
here ]. There is some problem with the 'name', either it can't create
the path or somesuch like that; You can try running the nameserver in
the debugger and see what it's doing.

	Alternatively, there is code somewhere: see
libbonobo/bonobo-moniker-util.c (bonobo_string_to_CosNaming_Name) that
does what you want to do, try poking at that. IMHO having the name
defined as a sequence is just a terrible idea - blame the OMG.

	HTH,

		Michael.

-- 
 mmeeks@gnu.org  <><, Pseudo Engineer, itinerant idiot




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]