]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libads: reverse termination condition in netlogon_pings_done()
authorRalph Boehme <slow@samba.org>
Thu, 24 Jul 2025 10:55:30 +0000 (12:55 +0200)
committerGünther Deschner <gd@samba.org>
Wed, 13 Aug 2025 18:30:44 +0000 (18:30 +0000)
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 <slow@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
source3/libads/netlogon_ping.c

index 22f5a56b395bffff16962a3df21bf345cc7c6981..76263a72d715624de8b4b1dcd6e6482b94744d3a 100644 (file)
@@ -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,