]> git.sur5r.net Git - openldap/commitdiff
ITS#5261 quick fix, don't checkpoint on first write to DB
authorHoward Chu <hyc@openldap.org>
Sat, 22 Dec 2007 05:00:38 +0000 (05:00 +0000)
committerHoward Chu <hyc@openldap.org>
Sat, 22 Dec 2007 05:00:38 +0000 (05:00 +0000)
servers/slapd/overlays/syncprov.c

index 45ae81a7f913448aaf498ea61d3689fe7c47b81a..6ed089f3c12c93d7ecf01817da960f5ea15c4d4c 100644 (file)
@@ -1607,8 +1607,12 @@ syncprov_op_response( Operation *op, SlapReply *rs )
                        }
                        if ( si->si_chktime &&
                                (op->o_time - si->si_chklast >= si->si_chktime )) {
-                               do_check = 1;
-                               si->si_chklast = op->o_time;
+                               if ( si->si_chklast ) {
+                                       do_check = 1;
+                                       si->si_chklast = op->o_time;
+                               } else {
+                                       si->si_chklast = 1;
+                               }
                        }
                }
                ldap_pvt_thread_rdwr_wunlock( &si->si_csn_rwlock );