From 4e27fea1f9fafa8fa80caeb77ae0da62be0def9a Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 30 Oct 2006 11:18:26 +0000 Subject: [PATCH] Revert last change for extract.c, due to tests failing. We can't use offset for determining whether a record stream indexing is finished or not. Indeed filters, like ALVIS, reads large chunks at a time. The grs.{regx,tcl} filter instead is modified to return the "right thing", i.e. NULL data1 tree (signalling EOF / no more data). --- index/extract.c | 6 +----- index/regxread.c | 8 +++++++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/index/extract.c b/index/extract.c index f7dbde3..cfee338 100644 --- a/index/extract.c +++ b/index/extract.c @@ -1,4 +1,4 @@ -/* $Id: extract.c,v 1.232 2006-10-29 20:35:58 adam Exp $ +/* $Id: extract.c,v 1.233 2006-10-30 11:18:26 adam Exp $ Copyright (C) 1995-2006 Index Data ApS @@ -441,8 +441,6 @@ ZEBRA_RES zebra_extract_file(ZebraHandle zh, SYSNO *sysno, const char *fname, } while(1) { - off_t prev_off = streamp->tellf(streamp); - r = zebra_extract_record_stream(zh, streamp, deleteFlag, 0, /* tst_mode */ @@ -461,8 +459,6 @@ ZEBRA_RES zebra_extract_file(ZebraHandle zh, SYSNO *sysno, const char *fname, { break; } - if (prev_off == streamp->tellf(streamp)) - break; } if (streamp) stream.destroy(streamp); diff --git a/index/regxread.c b/index/regxread.c index 993fb53..f855d4b 100644 --- a/index/regxread.c +++ b/index/regxread.c @@ -1,4 +1,4 @@ -/* $Id: regxread.c,v 1.3 2006-08-22 13:39:27 adam Exp $ +/* $Id: regxread.c,v 1.4 2006-10-30 11:18:26 adam Exp $ Copyright (C) 1995-2006 Index Data ApS @@ -1843,12 +1843,18 @@ static data1_node *lexRoot (struct lexSpec *spec, off_t offset, } #endif execAction (spec, lt->beginActionList, ptr, &ptr); + lexNode (spec, &ptr); while (spec->d1_level) { tagDataRelease (spec); (spec->d1_level)--; } + /* return here if no 'end record' was issued and we're dealing + with non-first record in stream */ + if (spec->stop_flag == 0 && offset) + return 0; + execAction (spec, lt->endActionList, ptr, &ptr); return spec->d1_stack[0]; } -- 1.7.10.4