From 1e6d660cabb2425e31552deb2161b72435b27d5b Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Sun, 29 Oct 2006 20:35:58 +0000 Subject: [PATCH] For record file stream indexing, stop looping if offset is unmodified by call to filter. This appears as bug #234, but really isn't. --- index/extract.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/index/extract.c b/index/extract.c index 1439538..f7dbde3 100644 --- a/index/extract.c +++ b/index/extract.c @@ -1,4 +1,4 @@ -/* $Id: extract.c,v 1.231 2006-10-29 17:20:01 adam Exp $ +/* $Id: extract.c,v 1.232 2006-10-29 20:35:58 adam Exp $ Copyright (C) 1995-2006 Index Data ApS @@ -441,6 +441,8 @@ 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 */ @@ -459,6 +461,8 @@ 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); -- 1.7.10.4