From 333741ffa692eab0ff5a9c895585691ea6ae3f87 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Fri, 9 Oct 2009 20:11:50 +0200 Subject: [PATCH] Adjust presentChunk for low value of pz:maxrecs Set presentChunk to pz:maxrecs if that is lower than 20 (default value of presentChunk). --- src/client.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/client.c b/src/client.c index b34cb60..716651c 100644 --- a/src/client.c +++ b/src/client.c @@ -517,15 +517,18 @@ void client_start_search(struct client *cl) ZOOM_connection_option_set(link, "elementSetName", opt_elements); if (*opt_requestsyn) ZOOM_connection_option_set(link, "preferredRecordSyntax", opt_requestsyn); - if (*opt_maxrecs) - ZOOM_connection_option_set(link, "count", opt_maxrecs); - else - ZOOM_connection_option_set(link, "count", "100"); + if (!*opt_maxrecs) + opt_maxrecs = "100"; + + ZOOM_connection_option_set(link, "count", opt_maxrecs); if (databaseName) ZOOM_connection_option_set(link, "databaseName", databaseName); - ZOOM_connection_option_set(link, "presentChunk", "20"); + if (atoi(opt_maxrecs) > 20) + ZOOM_connection_option_set(link, "presentChunk", "20"); + else + ZOOM_connection_option_set(link, "presentChunk", opt_maxrecs); if (cl->cqlquery) { -- 1.7.10.4