From: Mike Taylor Date: Wed, 5 May 2004 16:22:18 +0000 (+0000) Subject: Refuse to scan with step-size specified and non-zero. X-Git-Tag: ZEBRA.1.3.16~119 X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=commitdiff_plain;h=2be6f2e10474562a997c342b20ea62348199c033 Refuse to scan with step-size specified and non-zero. Use diagnostic 205 "Only zero step size supported for Scan". --- diff --git a/index/zserver.c b/index/zserver.c index cfa6587..3ba03d9 100644 --- a/index/zserver.c +++ b/index/zserver.c @@ -1,4 +1,4 @@ -/* $Id: zserver.c,v 1.114 2004-03-29 15:48:14 adam Exp $ +/* $Id: zserver.c,v 1.115 2004-05-05 16:22:18 mike Exp $ Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004 Index Data Aps @@ -329,6 +329,11 @@ static int bend_scan (void *handle, bend_scan_rr *r) zebra_result (zh, &r->errcode, &r->errstring); return 0; } + if (r->step_size != 0 && *r->step_size != 0) { + r->errcode = 205; /* "Only zero step size supported for Scan" */ + r->errstring = 0; + return 0; + } r->entries = (struct scan_entry *) odr_malloc (r->stream, sizeof(*r->entries) * r->num_entries); zebra_scan (zh, r->stream, r->term,