tevent: traverse the ev->fd_event list instead of the poll_ev->fds array
commitaae4312b745cd2e40ca7a224831745e7a6e9bba1
authorStefan Metzmacher <metze@samba.org>
Thu, 21 Feb 2013 14:41:17 +0000 (21 15:41 +0100)
committerKarolin Seeger <kseeger@samba.org>
Wed, 6 Mar 2013 09:12:00 +0000 (6 10:12 +0100)
tree3172be8e093ecf26ce3e8df3f9d1136456ee9179
parent7b1a12c213f66cff4a3e20bf95e88c34569b0041
tevent: traverse the ev->fd_event list instead of the poll_ev->fds array

That has the same complexity but simplifies the code.

It also seems to fix a real problem, which was found
by the following test failure in Samba's autobuild,
while removing the epoll support from the "standard" backend.

    [402/1555 in 19m8s] samba3.raw.composite(plugin_s4_dc)
    smbtorture 4.1.0pre1-DEVELOPERBUILD
    Using seed 1361531675
    Testing savefile
    Testing parallel fetchfile with 10 ops
    waiting for completion
    maximum runtime exceeded for smbtorture - terminating
    UNEXPECTED(error): samba3.raw.composite.fetchfile (subunit.RemotedTestCase)(plugin_s4_dc)
    REASON: _StringException: _StringException: was started but never finished!
    UNEXPECTED(error): samba3.raw.composite.fetchfile(plugin_s4_dc) (subunit.RemotedTestCase)
    REASON: was started but never finished!

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
lib/tevent/tevent_poll.c