tevent: traverse the ev->fd_event list instead of the poll_ev->fds array
authorStefan Metzmacher <metze@samba.org>
Thu, 21 Feb 2013 14:41:17 +0000 (15:41 +0100)
committerStefan Metzmacher <metze@samba.org>
Fri, 1 Mar 2013 09:48:40 +0000 (10:48 +0100)
commit53614a16d3ff7add3678e66aef111f7b03431e67
treedb761a73654c568817b66b677244c05cf7b62def
parent2c1b3c2837d85e5fc308b2d999ecb0393cfd1a9f
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>
lib/tevent/tevent_poll.c