INN commit: trunk (doc/pod/news.pod frontends/cnfsheadconf.in)
INN Commit
rra at isc.org
Sat May 8 11:10:15 UTC 2010
Date: Saturday, May 8, 2010 @ 04:10:14
Author: iulius
Revision: 9055
The order of CNFS buffers in a metacycbuff is now properly read and written
by cnfsheadconf. There previoulsy was a confusion between hexadecimal
and decimal values.
Thanks to John F. Morse for the bug report.
Modified:
trunk/doc/pod/news.pod
trunk/frontends/cnfsheadconf.in
---------------------------+
doc/pod/news.pod | 6 ++++++
frontends/cnfsheadconf.in | 20 +++++++++++---------
2 files changed, 17 insertions(+), 9 deletions(-)
Modified: doc/pod/news.pod
===================================================================
--- doc/pod/news.pod 2010-05-08 10:23:55 UTC (rev 9054)
+++ doc/pod/news.pod 2010-05-08 11:10:14 UTC (rev 9055)
@@ -109,6 +109,12 @@
F<cycbuff.conf>, that is to say lines ending with a backslash (C<\>).
Thanks to John S<F. Morse> for the bug report.
+=item *
+
+The order of CNFS buffers in a metacycbuff is now properly read and written
+by B<cnfsheadconf>. There previoulsy was a confusion between hexadecimal
+and decimal values. Thanks again to John S<F. Morse>.
+
=back
=head1 Changes in 2.5.2
Modified: frontends/cnfsheadconf.in
===================================================================
--- frontends/cnfsheadconf.in 2010-05-08 10:23:55 UTC (rev 9054)
+++ frontends/cnfsheadconf.in 2010-05-08 11:10:14 UTC (rev 9055)
@@ -249,7 +249,7 @@
my($CNFSLASIZ)=16;
my($headerlength) = 2 * $CNFSMASIZ + 2 * $CNFSNASIZ + $CNFSPASIZ + (6 * $CNFSLASIZ);
my($buff, @entries, $e);
- my($magic, $name, $path, $lena, $freea, $updatea, $cyclenuma, $metaname, $orderinmeta, $currentbuff, $blksza);
+ my($magic, $name, $path, $lena, $freea, $updatea, $cyclenuma, $metaname, $orderinmetaa, $currentbuff, $blksza);
if ($opt_w) {
if(! open(BUFF, "+< $buffpath") ) {
@@ -269,7 +269,7 @@
exit(1);
}
- ($magic, $name, $path, $lena, $freea, $updatea, $cyclenuma, $metaname, $orderinmeta, $currentbuff, $blksza) = unpack("a8 a16 a64 a16 a16 a16 a16 a16 a16 a8 a16", $buff);
+ ($magic, $name, $path, $lena, $freea, $updatea, $cyclenuma, $metaname, $orderinmetaa, $currentbuff, $blksza) = unpack("a8 a16 a64 a16 a16 a16 a16 a16 a16 a8 a16", $buff);
if(!$magic) {
print STDERR "Error while unpacking header ...\n";
@@ -280,6 +280,7 @@
my($free) = bhex($freea);
my($update) = hex($updatea);
my($cyclenum) = hex($cyclenuma) - 1;
+ my($orderinmeta) = hex($orderinmetaa);
my($blksz) = ($magic =~ m/^CBuf4/) ? hex($blksza) : 512;
my ($nupdate_str, $nago_str) = &make_time ($update);
@@ -332,19 +333,20 @@
if ($in ne "") {
$metaname = sprintf("%0.17s\0", $in);
}
- print "Order [$orderinmeta] => ";
- $in = <>;
- chop $in;
- if ($in ne "") {
- $orderinmeta = sprintf("%016d\0", $in);
- }
+ print "Order [$orderinmeta ($orderinmetaa)] => ";
+ $in = <>;
+ chop $in;
+ if ($in ne "") {
+ $in = bint2hex($in);
+ $orderinmetaa = sprintf("%017.17s\0", $in);
+ }
print "Currentbuff [$currentbuff] => ";
$in = <>;
chop $in;
if ($in eq "TRUE" || $in eq "FALSE") {
$currentbuff = sprintf("%0.8s", $in);
}
- $buff = pack("a8 a16 a64 a16 a16 a16 a16 a16 a16 a8", $magic, $name, $path, $lena, $freea, $updatea, $cyclenuma, $metaname, $orderinmeta, $currentbuff);
+ $buff = pack("a8 a16 a64 a16 a16 a16 a16 a16 a16 a8", $magic, $name, $path, $lena, $freea, $updatea, $cyclenuma, $metaname, $orderinmetaa, $currentbuff);
$buff .= pack("a16", $blksza) if ($magic =~ m/^CBuf4/);
seek(BUFF, 0, 0);
if(! syswrite(BUFF, $buff, $headerlength) ) {
More information about the inn-committers
mailing list