Two cnfsstat bugs
Mike Bird
mgb at yosemite.net
Wed Aug 25 02:36:29 UTC 1999
1) In INN 2.2, the last loop in the cnfsstat file, which scans for oldest
article, revises $update if a more recent time is found. However, this has
no effect as $nupdate_str and $nago_str have already been created from
$update. The line which does this should be moved after the loop, e.g.
just before the close(BUFF).
2) If two articles with identical timestamps are found the same loop
incorrectly treats the latter as the oldest timestamp ... a "<" should be
changed to a "<=". NOTE: This necessarily slows cnfsstat considerably for
cycbuffs containing very large articles.
The bugs are only apparent when used with -a option and when cycle count is
non-zero.
--- cnfsstat.ORIGINAL Thu Aug 12 14:13:27 1999
+++ cnfsstat Tue Aug 24 19:28:55 1999
@@ -446,8 +446,6 @@
my($update) = hex($updatea);
my($cyclenum) = hex($cyclenuma) - 1;
- my ($nupdate_str, $nago_str) = &make_time ($update);
-
if ($opt_a) {
# The 16384 is a fuzz factor. New articles are actually
@@ -467,7 +465,7 @@
last do_seek unless $time = &lookup_age ($1);
# Is the article newer than the last update?
- if ($time > $update) {
+ if ($time >= $update) {
$update = $time;
next do_seek;
}
@@ -477,6 +475,9 @@
}
}
}
+
+ my ($nupdate_str, $nago_str) = &make_time ($update);
+
close(BUFF);
return($name,$len,$free,$update,$cyclenum,$nupdate_str,$nago_str,$oupdate_st
r,$oago_str);
}
----------------------------------------------------------
Mike Bird Tel: 209-742-5000 FAX: 209-966-3117
President POP: 209-742-5156 PGR: 209-742-9979
Iron Mtn Systems http://member.yosemite.net/
More information about the inn-workers
mailing list