From 170167b891ba8e3f8284d850f7c4236a39e38887 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Fri, 19 Jun 2009 15:25:37 +0200 Subject: [PATCH] Log freelist info changes --- isamb/isamb.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/isamb/isamb.c b/isamb/isamb.c index 13bb0cf..f70a65e 100644 --- a/isamb/isamb.c +++ b/isamb/isamb.c @@ -569,6 +569,10 @@ struct ISAMB_block *new_block(ISAMB b, int leaf, int cat) zint block_no; block_no = b->file[cat].head.last_block++; p->pos = block_no * CAT_MAX + cat; + if (b->log_freelist) + yaz_log(b->log_freelist, "got block " + ZINT_FORMAT " from last %d:" ZINT_FORMAT, p->pos, + cat, p->pos/CAT_MAX); } else { @@ -584,8 +588,10 @@ struct ISAMB_block *new_block(ISAMB b, int leaf, int cat) zebra_exit("isamb:new_block"); } } - yaz_log(b->log_freelist, "got block " ZINT_FORMAT " from freelist %d:" ZINT_FORMAT, p->pos, - cat, p->pos/CAT_MAX); + if (b->log_freelist) + yaz_log(b->log_freelist, "got block " + ZINT_FORMAT " from freelist %d:" ZINT_FORMAT, p->pos, + cat, p->pos/CAT_MAX); memcpy(&b->file[cat].head.free_list, p->buf, sizeof(zint)); } p->cat = cat; -- 1.7.10.4