Re: [patch] min_delay bugfix.



On Thu, 2005-06-23 at 15:58 -0400, Robert Love wrote:
> Dan,
> 
> In src/NetworkManagerDevice.c :: nm_device_wireless_wait_for_link(), we
> set min_delay to
> 
> 	const guint	delay = 30;
>  	const guint	required_tries = 10;
> 	const guint	min_delay = 2 * (required_tries / delay);
> 
> That is zero.
> 
> We then compare it to the timeout, an unsigned int.  The comparison is
> always false.
> 
> Based on a comment below (which says we want to round the timeout up to
> 6 seconds), I think we really want
> 
> 	const guint	min_delay = 2 * (delay / required_tries);
> 
> Attached patch does that.
> 
> Correct?  If so, may I commit?

Looks sane.  Go for it.

Dan




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