afh: Chunk numbers are zero-based.
authorAndre Noll <maan@systemlinux.org>
Tue, 17 Aug 2010 20:11:24 +0000 (22:11 +0200)
committerAndre Noll <maan@systemlinux.org>
Tue, 17 Aug 2010 20:11:24 +0000 (22:11 +0200)
This makes the numbers match what para_server logs.

afh.c

diff --git a/afh.c b/afh.c
index b38dfbb..b66e260 100644 (file)
--- a/afh.c
+++ b/afh.c
@@ -76,7 +76,7 @@ static void print_chunk_table(struct afh_info *afhi)
                from = tv2ms(&tv);
                tv_scale(i, &afhi->chunk_tv, &tv);
                to = tv2ms(&tv);
-               printf("%d [%lu.%03lu - %lu.%03lu] %u - %u (%u)\n", i,
+               printf("%d [%lu.%03lu - %lu.%03lu] %u - %u (%u)\n", i - 1,
                        from / 1000, from % 1000, to / 1000, to % 1000,
                        afhi->chunk_table[i - 1], afhi->chunk_table[i],
                        afhi->chunk_table[i] - afhi->chunk_table[i - 1]);