[BUG] debug: report the correct poller list in verbose mode
When running with -vv or -V -d, the list of usable polling systems is reported. The final selection did not take into account the possible failures during the tests, which is misleading and could make one think that a non-working poller will be used, while it is not the case. Fix that to really report the correct ones. (cherry picked from commit 6d0e354e0171f08b7b3868ad2882c3663bd068a7)
This commit is contained in:
parent
1f5848a460
commit
e79c3b24fb
12
src/fd.c
12
src/fd.c
|
@ -119,11 +119,12 @@ int list_pollers(FILE *out)
|
|||
last = next = -1;
|
||||
while (1) {
|
||||
for (p = 0; p < nbpollers; p++) {
|
||||
if (!bp || (pollers[p].pref > bp->pref))
|
||||
bp = &pollers[p];
|
||||
if ((next < 0 || pollers[p].pref > next)
|
||||
&& (last < 0 || pollers[p].pref < last))
|
||||
&& (last < 0 || pollers[p].pref < last)) {
|
||||
next = pollers[p].pref;
|
||||
if (!bp || (pollers[p].pref > bp->pref))
|
||||
bp = &pollers[p];
|
||||
}
|
||||
}
|
||||
|
||||
if (next == -1)
|
||||
|
@ -140,8 +141,11 @@ int list_pollers(FILE *out)
|
|||
fprintf(out, " test result OK");
|
||||
if (next > 0)
|
||||
usable++;
|
||||
} else
|
||||
} else {
|
||||
fprintf(out, " test result FAILED");
|
||||
if (bp == &pollers[p])
|
||||
bp = NULL;
|
||||
}
|
||||
fprintf(out, "\n");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue