X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fzoom-c.c;h=ea23a86af56f9a695807e9c8b163d126210b3f9e;hb=a5a9ecf542c87afaa06315bcb389686bedae07b3;hp=f1ecd6dbd901d8534756593374c5f97e44a5df18;hpb=c6cccdaf2abfed2fd53b43e079a9dc47bc35be6b;p=yaz-moved-to-github.git diff --git a/src/zoom-c.c b/src/zoom-c.c index f1ecd6d..ea23a86 100644 --- a/src/zoom-c.c +++ b/src/zoom-c.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2007, Index Data ApS * See the file LICENSE for details. * - * $Id: zoom-c.c,v 1.133 2007-06-04 09:18:09 adam Exp $ + * $Id: zoom-c.c,v 1.136 2007-06-25 18:34:09 adam Exp $ */ /** * \file zoom-c.c @@ -1341,7 +1341,7 @@ static zoom_ret ZOOM_connection_send_init(ZOOM_connection c) odr_prepend(c->odr_out, "ZOOM-C", ireq->implementationName)); - version = odr_strdup(c->odr_out, "$Revision: 1.133 $"); + version = odr_strdup(c->odr_out, "$Revision: 1.136 $"); if (strlen(version) > 10) /* check for unexpanded CVS strings */ version[strlen(version)-2] = '\0'; ireq->implementationVersion = @@ -2892,8 +2892,6 @@ static Z_APDU *create_es_package(ZOOM_package p, const Odr_oid *oid) Z_APDU *apdu = zget_APDU(p->odr_out, Z_APDU_extendedServicesRequest); Z_ExtendedServicesRequest *req = apdu->u.extendedServicesRequest; - *req->function = Z_ExtendedServicesRequest_create; - str = ZOOM_options_get(p->options, "package-name"); if (str && *str) req->packageName = odr_strdup(p->odr_out, str); @@ -2908,11 +2906,24 @@ static Z_APDU *create_es_package(ZOOM_package p, const Odr_oid *oid) if (str) { if (!strcmp (str, "create")) - *req->function = 1; + *req->function = Z_ExtendedServicesRequest_create; if (!strcmp (str, "delete")) - *req->function = 2; + *req->function = Z_ExtendedServicesRequest_delete; if (!strcmp (str, "modify")) - *req->function = 3; + *req->function = Z_ExtendedServicesRequest_modify; + } + + str = ZOOM_options_get(p->options, "waitAction"); + if (str) + { + if (!strcmp (str, "wait")) + *req->waitAction = Z_ExtendedServicesRequest_wait; + if (!strcmp (str, "waitIfPossible")) + *req->waitAction = Z_ExtendedServicesRequest_waitIfPossible; + if (!strcmp (str, "dontWait")) + *req->waitAction = Z_ExtendedServicesRequest_dontWait; + if (!strcmp (str, "dontReturnPackage")) + *req->waitAction = Z_ExtendedServicesRequest_dontReturnPackage; } return apdu; } @@ -3164,6 +3175,8 @@ static Z_APDU *create_update_package(ZOOM_package p) Z_IUSuppliedRecords *notToKeep; Z_External *r = (Z_External *) odr_malloc(p->odr_out, sizeof(*r)); + const char *elementSetName = + ZOOM_options_get(p->options, "elementSetName"); apdu->u.extendedServicesRequest->taskSpecificParameters = r; @@ -3185,7 +3198,11 @@ static Z_APDU *create_update_package(ZOOM_package p) toKeep->databaseName = odr_strdup(p->odr_out, first_db); toKeep->schema = 0; + toKeep->elementSetName = 0; + if (elementSetName) + toKeep->elementSetName = odr_strdup(p->odr_out, elementSetName); + toKeep->actionQualifier = 0; toKeep->action = odr_intdup(p->odr_out, action_no); @@ -4079,6 +4096,8 @@ static void ZOOM_connection_do_io(ZOOM_connection c, int mask) if (c->cs->io_pending & CS_WANT_READ) mask += ZOOM_SELECT_READ; ZOOM_connection_set_mask(c, mask); + event = ZOOM_Event_create(ZOOM_EVENT_NONE); + ZOOM_connection_put_event(c, event); } else if (ret == 0) {