From: Ralph Boehme Date: Thu, 24 Jul 2025 10:55:30 +0000 (+0200) Subject: libads: reverse termination condition in netlogon_pings_done() X-Git-Tag: samba-4.22.4~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0a1f0d014175ba659af65018bf03d0eb16963e69;p=thirdparty%2Fsamba.git libads: reverse termination condition in netlogon_pings_done() No change in behaviour, prepares for upcoming change and minimizes its diff. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15844 Signed-off-by: Ralph Boehme Reviewed-by: Guenther Deschner (cherry picked from commit 6643d1fb3375903e2857e5bff33b39a4562c5a4d) --- diff --git a/source3/libads/netlogon_ping.c b/source3/libads/netlogon_ping.c index 22f5a56b395..76263a72d71 100644 --- a/source3/libads/netlogon_ping.c +++ b/source3/libads/netlogon_ping.c @@ -822,17 +822,18 @@ static void netlogon_pings_done(struct tevent_req *subreq) tevent_req_done(req); return; } - if (state->num_received == state->num_servers) { + if (state->num_received < state->num_servers) { /* - * Everybody replied, but we did not get enough good - * answers (see above) + * Wait for more answers */ - tevent_req_nterror(req, NT_STATUS_NOT_FOUND); return; } /* - * Wait for more answers + * Everybody replied, but we did not get enough good + * answers (see above) */ + tevent_req_nterror(req, NT_STATUS_NOT_FOUND); + return; } NTSTATUS netlogon_pings_recv(struct tevent_req *req,