From c0b434685f91be96135a56b2ed390fdbc18f3902 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 12 Oct 2009 22:32:52 +0200 Subject: [PATCH] Set ZOOM option start always for 0-case. For maxrecs=0 or maxrecs omitted, set ZOOM option "start". --- src/client.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/client.c b/src/client.c index e3b34cb..2cd05aa 100644 --- a/src/client.c +++ b/src/client.c @@ -499,7 +499,7 @@ void client_start_search(struct client *cl) const char *opt_maxrecs = session_setting_oneval(sdb, PZ_MAXRECS); const char *opt_sru = session_setting_oneval(sdb, PZ_SRU); const char *opt_sort = session_setting_oneval(sdb, PZ_SORT); - char maxrecs_str[24]; + char maxrecs_str[24], startrecs_str[24]; assert(link); @@ -534,13 +534,8 @@ void client_start_search(struct client *cl) else ZOOM_connection_option_set(link, "presentChunk", opt_maxrecs); - if (cl->startrecs) - { - char startrecs_str[24]; - sprintf(startrecs_str, "%d", cl->startrecs); - - ZOOM_connection_option_set(link, "start", startrecs_str); - } + sprintf(startrecs_str, "%d", cl->startrecs); + ZOOM_connection_option_set(link, "start", startrecs_str); if (databaseName) ZOOM_connection_option_set(link, "databaseName", databaseName); -- 1.7.10.4