[omniORB] Fix parameter parsing for omniOBpy setClientCallTimeout, setClientThreadCallTimeout, setClientConnectTimeout
Glen Walker
glen at walker.gen.nz
Wed Jan 31 03:32:48 GMT 2018
The C++ API for omniORB contains the functions
namespace omniORB {
void setClientCallTimeout(CORBA::ULong millisecs);
void setClientCallTimeout(CORBA::Object_ptr obj, CORBA::ULong millisecs);
void setClientThreadCallTimeout(CORBA::ULong millisecs);
void setClientConnectTimeout(CORBA::ULong millisecs);
};
and the Python API for omniORB contains the corresponding functions
omniORB.setClientCallTimeout(millisecs)
omniORB.setClientCallTimeout(objref, millisecs)
omniORB.setClientThreadCallTimeout(millisecs)
omniORB.setClientConnectTimeout(millisecs)
however omniORBpy is parsing the millisecs parameter as a signed integer
instead of an unsigned long. This leads to incorrect timeouts if values
over 2^31 - 1 are used. Admittedly this is only a problem for timeouts of
over 24.9 days, which should be uncommon, and we only noticed the issue
when debugging a problem where we had multipled a timeout in seconds by
1000 more that once.
Attached is a patch to fix the issue. Note that it uses "k" to parse the
unsigned long, which was introduced in Python 2.3, and will be a problem if
omniORBpy still supports earlier versions.
Cheers,
Glen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20180131/b48be66d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pyomniFunc.cc.patch
Type: application/octet-stream
Size: 1463 bytes
Desc: not available
URL: <http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20180131/b48be66d/attachment.obj>
More information about the omniORB-list
mailing list