apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@apache.org>
Subject Re: [PATCH] fix apr_poll tests on Darwin
Date Tue, 31 Dec 2002 17:24:29 GMT
I like; fixed the same emits on Win32.  Committed, thank you!

Bill

At 10:26 PM 12/30/2002, Garrett Rooney wrote:
>so i was playing with the unit tests on my os x box, and i noticed that there were a few
tests failing in testpoll.c (clear_all_signalled and recv_large_pollarray).  with a little
playing around, it turned out that we were getting spurious returned events because the select
based poll implementation wasn't zeroing out previous results before setting the current ones
and returning.
>
>here's a patch that makes all the poll tests pass for me.  2 down, 12 more to go ;-)
>
>-garrett
>
>===================================================================
>RCS file: /home/cvspublic/apr/poll/unix/poll.c,v
>retrieving revision 1.32
>diff -u -d -b -w -r1.32 poll.c
>--- poll/unix/poll.c    20 Sep 2002 10:42:37 -0000      1.32
>+++ poll/unix/poll.c    31 Dec 2002 04:23:29 -0000
>@@ -275,6 +275,10 @@
>     }
> #endif
>
>+    for (i = 0; i < *nsds; i++) {
>+      aprset[i].rtnevents = 0;
>+    }
>+
>     (*nsds) = rv;
>     if ((*nsds) == 0) {
>         return APR_TIMEUP;
>


Mime
View raw message