<div dir="ltr"><div>Hi Duncan,</div><div><br></div><div>I recently came across this issue again, would appreciate it if you would take a look at the included patch.<br></div><div><br></div><div>Kind regards,</div><div>Glen</div><div><br></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">---------- Forwarded message ---------<br>From: <b class="gmail_sendername" dir="auto">Glen Walker</b> <span dir="auto"><<a href="mailto:glen@walker.gen.nz">glen@walker.gen.nz</a>></span><br>Date: Wed, 31 Jan 2018 at 13:32<br>Subject: Fix parameter parsing for omniOBpy setClientCallTimeout, setClientThreadCallTimeout, setClientConnectTimeout<br>To: <<a href="mailto:omniorb-list@omniorb-support.com">omniorb-list@omniorb-support.com</a>><br></div><br><br><div dir="ltr"><div><div><div><div><div>The C++ API for omniORB contains the functions<br><br><span style="font-size:small"><span style="font-weight:bold">namespace</span></span><span style="font-size:small"> </span><span style="font-size:small">omniORB</span><span style="font-size:small"> {</span><span style="font-size:small"></span><br> <span style="font-size:small"></span><span style="font-size:small"><span style="font-weight:bold">void</span></span><span style="font-size:small"> </span><span style="font-size:small">setClientCallTimeout</span><span style="font-size:small">(</span><span style="font-size:small">CORBA</span><span style="font-size:small">::</span><span style="font-size:small">ULong</span><span style="font-size:small"> </span><span style="font-size:small">millisecs</span><span style="font-size:small">);<br></span> <span style="font-size:small"></span><span style="font-size:small"> </span><span style="font-size:small"><span style="font-weight:bold">void</span></span><span style="font-size:small"> </span><span style="font-size:small">setClientCallTimeout</span><span style="font-size:small">(</span><span style="font-size:small">CORBA</span><span style="font-size:small">::</span><span style="font-size:small">Object_ptr</span><span style="font-size:small"> </span><span style="font-size:small">obj</span><span style="font-size:small">, </span><span style="font-size:small">CORBA</span><span style="font-size:small">::</span><span style="font-size:small">ULong</span><span style="font-size:small"> </span><span style="font-size:small">millisecs</span><span style="font-size:small">);</span><span style="font-size:small"><br></span> <span style="font-size:small"></span><span style="font-size:small"><span style="font-weight:bold">void</span></span><span style="font-size:small"> </span><span style="font-size:small">setClientThreadCallTimeout</span><span style="font-size:small">(</span><span style="font-size:small">CORBA</span><span style="font-size:small">::</span><span style="font-size:small">ULong</span><span style="font-size:small"> </span><span style="font-size:small">millisecs</span><span style="font-size:small">);</span><span style="font-size:small"><br></span> <span style="font-size:small"></span><span style="font-size:small"><span style="font-weight:bold">void</span></span><span style="font-size:small"> </span><span style="font-size:small">setClientConnectTimeout</span><span style="font-size:small">(</span><span style="font-size:small">CORBA</span><span style="font-size:small">::</span><span style="font-size:small">ULong</span><span style="font-size:small"> </span><span style="font-size:small">millisecs</span><span style="font-size:small">);</span><span style="font-size:small"></span><br>};<br><br></div>and the Python API for omniORB contains the corresponding functions<br><br>omniORB.setClientCallTimeout(millisecs)<br>omniORB.setClientCallTimeout(objref, millisecs)<br>omniORB.setClientThreadCallTimeout(millisecs)<br>omniORB.setClientConnectTimeout(millisecs)<br><br></div>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.<br><br></div>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.<br><br></div>Cheers,<br></div>Glen<br></div>
</div></div></div>