tevent: traverse the ev->fd_event list instead of the poll_ev->fds array
commitde0204ccae514b26524893b51414c6c772a35a55
authorStefan Metzmacher <metze@samba.org>
Thu, 21 Feb 2013 14:41:17 +0000 (21 15:41 +0100)
committerJeremy Allison <jra@samba.org>
Fri, 1 Mar 2013 19:59:46 +0000 (1 11:59 -0800)
treedb761a73654c568817b66b677244c05cf7b62def
parentf45abeae40495460e29347ebc3c73b9ffece847d
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