* Copyright (c) 2000-2003, Index Data
* See the file LICENSE for details.
*
- * $Id: zoom-c.c,v 1.4 2003-11-19 19:07:26 adam Exp $
+ * $Id: zoom-c.c,v 1.6 2003-11-25 09:50:35 mike Exp $
*
* ZOOM layer for C, connections, result sets, queries.
*/
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)
impver = ZOOM_options_get (c->options, "implementationVersion");
ireq->implementationVersion =
- (char *) odr_malloc (c->odr_out, strlen("$Revision: 1.4 $") + 2 +
+ (char *) odr_malloc (c->odr_out, strlen("$Revision: 1.6 $") + 2 +
(impver ? strlen(impver) : 0));
strcpy (ireq->implementationVersion, "");
if (impver)
strcat (ireq->implementationVersion, impver);
strcat (ireq->implementationVersion, "/");
}
- strcat (ireq->implementationVersion, "$Revision: 1.4 $");
+ strcat (ireq->implementationVersion, "$Revision: 1.6 $");
*ireq->maximumRecordSize =
ZOOM_options_get_int (c->options, "maximumRecordSize", 1024*1024);
{
case Z_APDU_initResponse:
initrs = apdu->u.initResponse;
+ ZOOM_connection_option_set(c, "serverImplementationId",
+ initrs->implementationId ?
+ initrs->implementationId : "");
+ ZOOM_connection_option_set(c, "serverImplementationName",
+ initrs->implementationName ?
+ initrs->implementationName : "");
+ ZOOM_connection_option_set(c, "serverImplementationVersion",
+ initrs->implementationVersion ?
+ initrs->implementationVersion : "");
+ /* Set the three old options too, for old applications */
ZOOM_connection_option_set(c, "targetImplementationId",
initrs->implementationId ?
initrs->implementationId : "");