Error in open_socket_out timeout code
jra at samba.org
Mon Jun 28 19:07:37 GMT 2004
On Mon, Jun 28, 2004 at 11:33:02AM -0700, Joe Meadows wrote:
> There is a bug in lib/util_sock.c:open_socket_out() that causes timeouts to
> be incorrectly handled when attempting to open a socket. I ran across this
> problem when a timeout that was supposed to be ten seconds was taking over
> two minutes to time out. We're using version 3.0RC3 in our build but the
> logic looks to be the same in HEAD.
> Here's a snippet of the code as it exists now. The intention is to generate
> a series of increasingly longer timeouts until the total requested timeout
> has been exhausted. However the timeout code is not checking against the
> accumulated total time but rather against the length of the final timeout in
> the series. The resulting timeout is therefore the sum of this and all
> preceding timeouts.
Thanks for that. This already got fixed in the 3.0.x SVN branch by reducing
the timeout value. I've committed this into HEAD.
Thanks for pointing this out !
More information about the samba-technical