From f87d2eee00acc830ada9ee98c347f3d1415ea74b Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Tue, 25 Nov 2003 09:50:35 +0000 Subject: [PATCH 1/1] Use new "presentChunk" options in preference to old "step" if it's defined. (But still fall back on "step" if it's not.) --- src/zoom-c.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/zoom-c.c b/src/zoom-c.c index 0c3e85f..9ddd781 100644 --- a/src/zoom-c.c +++ b/src/zoom-c.c @@ -2,7 +2,7 @@ * Copyright (c) 2000-2003, Index Data * See the file LICENSE for details. * - * $Id: zoom-c.c,v 1.5 2003-11-24 11:25:07 mike Exp $ + * $Id: zoom-c.c,v 1.6 2003-11-25 09:50:35 mike Exp $ * * ZOOM layer for C, connections, result sets, queries. */ @@ -544,7 +544,12 @@ ZOOM_connection_search(ZOOM_connection c, ZOOM_query q) r->start = ZOOM_options_get_int(r->options, "start", 0); r->count = ZOOM_options_get_int(r->options, "count", 0); - r->step = ZOOM_options_get_int(r->options, "step", 0); + { + /* If "presentChunk" is defined use that; otherwise "step" */ + const char *cp = ZOOM_options_get (r->options, "presentChunk"); + r->step = ZOOM_options_get_int(r->options, + (cp != 0 ? "presentChunk": "step"), 0); + } r->piggyback = ZOOM_options_get_bool (r->options, "piggyback", 1); cp = ZOOM_options_get (r->options, "setname"); if (cp) @@ -928,7 +933,7 @@ static zoom_ret ZOOM_connection_send_init (ZOOM_connection c) impver = ZOOM_options_get (c->options, "implementationVersion"); ireq->implementationVersion = - (char *) odr_malloc (c->odr_out, strlen("$Revision: 1.5 $") + 2 + + (char *) odr_malloc (c->odr_out, strlen("$Revision: 1.6 $") + 2 + (impver ? strlen(impver) : 0)); strcpy (ireq->implementationVersion, ""); if (impver) @@ -936,7 +941,7 @@ static zoom_ret ZOOM_connection_send_init (ZOOM_connection c) strcat (ireq->implementationVersion, impver); strcat (ireq->implementationVersion, "/"); } - strcat (ireq->implementationVersion, "$Revision: 1.5 $"); + strcat (ireq->implementationVersion, "$Revision: 1.6 $"); *ireq->maximumRecordSize = ZOOM_options_get_int (c->options, "maximumRecordSize", 1024*1024); -- 1.7.10.4