]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#9015 Treat an empty cookie from a FALLBACK search as a success
authorOndřej Kuzník <ondra@openldap.org>
Tue, 7 May 2019 18:03:13 +0000 (19:03 +0100)
committerOndřej Kuzník <ondra@openldap.org>
Tue, 7 May 2019 18:03:35 +0000 (19:03 +0100)
servers/slapd/syncrepl.c

index 07da8f6287aaf33ed750a55a64441191a5dab31d..ad395820cc19e81aa3d1daa1a98419d0980ee4e2 100644 (file)
@@ -417,7 +417,7 @@ ldap_sync_search(
        /* If we're using a log but we have no state, then fallback to
         * normal mode for a full refresh.
         */
-       if ( si->si_syncdata && !si->si_syncCookie.numcsns ) {
+       if ( si->si_syncdata && !si->si_syncCookie.numcsns && !si->si_refreshDone ) {
                si->si_logstate = SYNCLOG_FALLBACK;
        }
 
@@ -1194,6 +1194,7 @@ do_syncrep2(
                        if ( err == LDAP_SUCCESS
                                && si->si_logstate == SYNCLOG_FALLBACK ) {
                                si->si_logstate = SYNCLOG_LOGGING;
+                               si->si_refreshDone = 1;
                                rc = LDAP_SYNC_REFRESH_REQUIRED;
                                slap_resume_listeners();
                        } else {