From 769b0ece6d1eb33e0f499c798cfff292c4f41053 Mon Sep 17 00:00:00 2001 From: pop Date: Wed, 26 Feb 2003 12:30:54 +0000 Subject: [PATCH] Don't dump core, when there were no recods indexed due to unknown type --- index/extract.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/index/extract.c b/index/extract.c index eb8d161..fb6e228 100644 --- a/index/extract.c +++ b/index/extract.c @@ -1,4 +1,4 @@ -/* $Id: extract.c,v 1.136 2003-02-26 09:13:51 pop Exp $ +/* $Id: extract.c,v 1.137 2003-02-26 12:30:54 pop Exp $ Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002 Index Data Aps @@ -970,6 +970,14 @@ int bufferExtractRecord (ZebraHandle zh, return 0; } + zh->reg->keys.buf_used = 0; + zh->reg->keys.prevAttrUse = -1; + zh->reg->keys.prevAttrSet = -1; + zh->reg->keys.prevSeqNo = 0; + zh->reg->sortKeys.buf_used = 0; + zh->reg->sortKeys.buf_max = 0; + zh->reg->sortKeys.buf = 0; + if (*recordType) { logf (LOG_DEBUG, "Record type explicitly specified: %s", recordType); recType = recType_byName (zh->reg->recTypes, recordType, subType, @@ -990,14 +998,6 @@ int bufferExtractRecord (ZebraHandle zh, return 0; } - zh->reg->keys.buf_used = 0; - zh->reg->keys.prevAttrUse = -1; - zh->reg->keys.prevAttrSet = -1; - zh->reg->keys.prevSeqNo = 0; - zh->reg->sortKeys.buf_used = 0; - zh->reg->sortKeys.buf_max = 0; - zh->reg->sortKeys.buf = 0; - extractCtrl.subType = subType; extractCtrl.init = extract_init; extractCtrl.tokenAdd = extract_token_add; -- 1.7.10.4