From: Sebastian Hammer Date: Sat, 6 Jan 2007 03:02:47 +0000 (+0000) Subject: Added check to prevent retrieval of more than global_parameters.toget recs X-Git-Tag: before.append.child~21 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=0d3944c157baf45465880ccbd72c04945062832d;p=pazpar2-moved-to-github.git Added check to prevent retrieval of more than global_parameters.toget recs --- diff --git a/src/pazpar2.c b/src/pazpar2.c index cb6a384..fa2d51f 100644 --- a/src/pazpar2.c +++ b/src/pazpar2.c @@ -1,4 +1,4 @@ -/* $Id: pazpar2.c,v 1.15 2007-01-05 20:33:05 adam Exp $ */; +/* $Id: pazpar2.c,v 1.16 2007-01-06 03:02:47 quinn Exp $ */; #include #include @@ -199,6 +199,8 @@ static void send_present(IOCHAN i) int start = cl->records + 1; toget = global_parameters.chunk; + if (toget > global_parameters.toget - cl->records) + toget = global_parameters.toget - cl->records; if (toget > cl->hits - cl->records) toget = cl->hits - cl->records;