Re: getting ORBit examples to work across the network



On Wed, 2008-02-06 at 09:05 +0100, Jules Colding wrote:
> You can also customize argv and create the ORB explicitly:
> 
> static CORBA_ORB
> create_orb(CORBA_Environment *ev)
> {
> 	CORBA_ORB orb = CORBA_OBJECT_NIL;
> 	int init_argc = 2;
> 	char **init_argv = (char**)malloc(sizeof(char*) * (init_argc));
> 	if (!init_argv)
> 		return CORBA_OBJECT_NIL;
> 
> 	init_argv[0] = "DUMMY_ARGV0";
> 	init_argv[1] = "--ORBNetID=ipaddr";
> 
> 	// initialize the ORB
> 	orb = CORBA_ORB_init(&init_argc, init_argv, "orb_orbit-io-thread", ev);
> 	if (ORBIT2_EX(ev))
> 		orb = CORBA_OBJECT_NIL;
> 
> 	free(init_argv);
> 
> 	return orb;
> }


Forgot this:

#undef ORBIT2_EX
#define ORBIT2_EX(_ev_) ((NULL != _ev_) && ((_ev_)->_major != CORBA_NO_EXCEPTION))


-- 
  jules




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