From: Adam Dickmeiss Date: Mon, 12 Oct 2009 20:32:52 +0000 (+0200) Subject: Set ZOOM option start always for 0-case. X-Git-Tag: v1.2.2~2^2 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=c0b434685f91be96135a56b2ed390fdbc18f3902;p=pazpar2-moved-to-github.git Set ZOOM option start always for 0-case. For maxrecs=0 or maxrecs omitted, set ZOOM option "start". --- 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);