From 012ebe86693784419f1ab4c62a727d8c3a7aabf0 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 2 Aug 2004 10:06:34 +0000 Subject: [PATCH] Add ES package of type commit --- src/seshigh.c | 8 ++++++-- src/zoom-c.c | 15 ++++++++++----- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/src/seshigh.c b/src/seshigh.c index edad261..c307ff2 100644 --- a/src/seshigh.c +++ b/src/seshigh.c @@ -2,7 +2,7 @@ * Copyright (c) 1995-2004, Index Data * See the file LICENSE for details. * - * $Id: seshigh.c,v 1.25 2004-06-15 10:53:26 adam Exp $ + * $Id: seshigh.c,v 1.26 2004-08-02 10:06:34 adam Exp $ */ /* @@ -1034,6 +1034,8 @@ static int process_z_request(association *assoc, request *req, char **msg) return -1; } break; + case Z_APDU_triggerResourceControlRequest: + return 0; default: *msg = "Bad APDU received"; return -1; @@ -1286,6 +1288,8 @@ static Z_APDU *process_initRequest(association *assoc, request *reqb) ODR_MASK_SET(resp->options, Z_Options_negotiationModel); strcat(options, " negotiation"); } + + ODR_MASK_SET(resp->options, Z_Options_triggerResourceCtrl); if (ODR_MASK_GET(req->protocolVersion, Z_ProtocolVersion_1)) { @@ -1322,7 +1326,7 @@ static Z_APDU *process_initRequest(association *assoc, request *reqb) assoc->init->implementation_name, odr_prepend(assoc->encode, "GFS", resp->implementationName)); - version = odr_strdup(assoc->encode, "$Revision: 1.25 $"); + version = odr_strdup(assoc->encode, "$Revision: 1.26 $"); if (strlen(version) > 10) /* check for unexpanded CVS strings */ version[strlen(version)-2] = '\0'; resp->implementationVersion = odr_prepend(assoc->encode, diff --git a/src/zoom-c.c b/src/zoom-c.c index 9496fb5..38846b0 100644 --- a/src/zoom-c.c +++ b/src/zoom-c.c @@ -2,7 +2,7 @@ * Copyright (c) 2000-2004, Index Data * See the file LICENSE for details. * - * $Id: zoom-c.c,v 1.28 2004-04-30 12:43:32 adam Exp $ + * $Id: zoom-c.c,v 1.29 2004-08-02 10:06:34 adam Exp $ * * ZOOM layer for C, connections, result sets, queries. */ @@ -1001,7 +1001,7 @@ static zoom_ret ZOOM_connection_send_init (ZOOM_connection c) ZOOM_options_get(c->options, "implementationName"), odr_prepend(c->odr_out, "ZOOM-C", ireq->implementationName)); - version = odr_strdup(c->odr_out, "$Revision: 1.28 $"); + version = odr_strdup(c->odr_out, "$Revision: 1.29 $"); if (strlen(version) > 10) /* check for unexpanded CVS strings */ version[strlen(version)-2] = '\0'; ireq->implementationVersion = odr_prepend(c->odr_out, @@ -2670,17 +2670,22 @@ ZOOM_API(void) apdu->u.extendedServicesRequest->taskSpecificParameters = r; } } - if (!strcmp(type, "create")) /* create database */ + else if (!strcmp(type, "create")) /* create database */ { apdu = create_admin_package(p, Z_ESAdminOriginPartToKeep_create, 0, 0); } - if (!strcmp(type, "drop")) /* drop database */ + else if (!strcmp(type, "drop")) /* drop database */ { apdu = create_admin_package(p, Z_ESAdminOriginPartToKeep_drop, 0, 0); } - if (!strcmp(type, "update")) /* update record(s) */ + else if (!strcmp(type, "commit")) /* commit changes */ + { + apdu = create_admin_package(p, Z_ESAdminOriginPartToKeep_commit, + 0, 0); + } + else if (!strcmp(type, "update")) /* update record(s) */ { apdu = create_update_package(p); } -- 1.7.10.4