]> git.sur5r.net Git - openldap/commitdiff
ITS#6999 fix syncrepl timeout in refreshAndPersist
authorHoward Chu <hyc@openldap.org>
Fri, 29 Jul 2011 20:05:45 +0000 (13:05 -0700)
committerHoward Chu <hyc@openldap.org>
Fri, 29 Jul 2011 20:05:45 +0000 (13:05 -0700)
servers/slapd/syncrepl.c

index 717827084966b6097677d1987101df9e03f7c3f3..9d3d9f56ce29aa8985376a85668da75510c87fa3 100644 (file)
@@ -823,7 +823,7 @@ do_syncrep2(
 
        slap_dup_sync_cookie( &syncCookie_req, &si->si_syncCookie );
 
-       if ( abs(si->si_type) == LDAP_SYNC_REFRESH_AND_PERSIST ) {
+       if ( abs(si->si_type) == LDAP_SYNC_REFRESH_AND_PERSIST && si->si_refreshDone ) {
                tout_p = &tout;
        } else {
                tout_p = NULL;
@@ -1241,6 +1241,9 @@ do_syncrep2(
                                                si->si_refreshDone = 1;
                                        }
                                        ber_scanf( ber, /*"{"*/ "}" );
+                                       if ( abs(si->si_type) == LDAP_SYNC_REFRESH_AND_PERSIST &&
+                                               si->si_refreshDone )
+                                               tout_p = &tout;
                                        break;
                                case LDAP_TAG_SYNC_ID_SET:
                                        Debug( LDAP_DEBUG_SYNC,