apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Querna <c...@force-elite.com>
Subject Re: [PATCH] bug in kqueue implementation of apr_pollset_poll (wrong conversion from usec)
Date Mon, 21 Aug 2006 06:19:47 GMT
Marco Molteni wrote:
> Hi,
> 
> first of all, thanks for providing APR :-)
> 
> I think I've found a bug in the kqueue implementation of apr_pollset_poll().
> I am using FreeBSD -current with apr-1.2.7, but the SVN trunk
> version of kqueue.c has the same bug:

Yep. The patch looks correct to me.  I didn't have a chance to get to it 
this weekend, but I intend to commit it early this week if no one else 
beats me to it.

...
> lines 245,246 convert from timeout (usec) to struct timespec, but line 246
> assigns milliseconds to nanoseconds, with a wrong magnitude of 10^6.
> 
> Net effect is that a timeout of say 999 msec becomes a timeout of 999 nsec.
> 
> Please find attached a proposed patch and a test program to expose the bug.

Thank You for the detailed explanation, test case, and patch; it makes 
it so much easier for us :)

-Paul


Mime
View raw message