[omniORB] setClientCallTimeout(obj, ) crash

Duncan Grisby duncan at grisby.org
Wed May 5 16:17:58 BST 2004


On Wednesday 5 May, "Frederic Prin" wrote:

> I use omniORB4.0.3 and I sometimes experience crash when a client calls
> setClientCallTimeout(obj, ).
> The internal call oo = obj->_PR_getobj(); returns NULL and oo-> crash.
> 
> 	void
> 	omniORB::setClientCallTimeout(CORBA::Object_ptr obj,
> CORBA::ULong v)
> 	{
> 	  omniObjRef* oo = obj->_PR_getobj();
> 	  oo->_setTimeout(v / 1000, (v % 1000) * 1000000);
> 	}
> 
> What is the  _PR_getobj(); job ?

It gets the internal omniObjRef part of an object reference.

> Why it can returned NULL ?

It returns null when the object reference is nil. In your code, you
should check for nil before trying to set the timeout.

Having said that, the code ought to check. I've checked in a change so
that it throws INV_OBJREF if you try to set the timeout of a nil
object reference.

Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan at grisby.org     --
   -- http://www.grisby.org --



More information about the omniORB-list mailing list