Преглед изворни кода

After N calls(which does a checkpoint()), reset the counter.

Adam Heath пре 25 година
родитељ
комит
8ecfa55365
2 измењених фајлова са 9 додато и 1 уклоњено
  1. 5 0
      ChangeLog
  2. 4 1
      lib/dbmodify.c

+ 5 - 0
ChangeLog

@@ -1,3 +1,8 @@
+Sun Jan  7 14:31:38 CST 2001 Adam Heath <doogie@debian.org>
+
+  * lib/dbmodify.c: After N calls(which does a checkpoint()), reset
+    the counter.
+
 Sun Jan  7 14:27:57 CST 2001 Adam Heath <doogie@debian.org>
 
   * include/dpkg-db.h:  Forgot the status-pipe struct.

+ 4 - 1
lib/dbmodify.c

@@ -260,7 +260,10 @@ void modstatdb_note(struct pkginfo *pkg) {
 
   nextupdate++;  
 
-  if (nextupdate > MAXUPDATES) checkpoint();
+  if (nextupdate > MAXUPDATES) {
+    checkpoint();
+    nextupdate= 0;
+  }
 
   createimptmp();