X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fzoom-c.c;h=44408840d8821b5a6a8823b1d2d02dbd353f8252;hb=84cb4c71eb572b5700cd7b3230446d9578521870;hp=3563ab555e2b2f35a881010f5abb245aef2ecd8e;hpb=52741a76f17524da0bc416fe82db69eda7700797;p=yaz-moved-to-github.git diff --git a/src/zoom-c.c b/src/zoom-c.c index 3563ab5..4440884 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.106 2007-01-10 13:25:46 adam Exp $ + * $Id: zoom-c.c,v 1.109 2007-01-22 10:35:07 adam Exp $ */ /** * \file zoom-c.c @@ -103,7 +103,7 @@ static ZOOM_Event ZOOM_connection_get_event(ZOOM_connection c) return event; } -int ZOOM_connection_peek_event(ZOOM_connection c) +ZOOM_API(int) ZOOM_connection_peek_event(ZOOM_connection c) { ZOOM_Event event = c->m_queue_front; @@ -1250,7 +1250,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.106 $"); + version = odr_strdup(c->odr_out, "$Revision: 1.109 $"); if (strlen(version) > 10) /* check for unexpanded CVS strings */ version[strlen(version)-2] = '\0'; ireq->implementationVersion = @@ -2958,7 +2958,13 @@ static Z_ItemOrder *encode_item_order(ZOOM_package p) *req->u.esRequest->notToKeep->resultSetItem->item = (str ? atoi(str) : 1); } - req->u.esRequest->notToKeep->itemRequest = encode_ill_request(p); + + str = ZOOM_options_get(p->options, "doc"); + if (str) + req->u.esRequest->notToKeep->itemRequest = + z_ext_record(p->odr_out, VAL_TEXT_XML, str, strlen(str)); + else + req->u.esRequest->notToKeep->itemRequest = encode_ill_request(p); return req; } @@ -4125,41 +4131,41 @@ ZOOM_API(int) ZOOM_connection_fire_event_timeout(ZOOM_connection c) } ZOOM_API(int) - ZOOM_process_event(int no, ZOOM_connection *cs) + ZOOM_connection_process(ZOOM_connection c) +{ + ZOOM_Event event; + if (!c) + return 0; + + event = ZOOM_connection_get_event(c); + if (event) + { + ZOOM_Event_destroy(event); + return 1; + } + ZOOM_connection_exec_task(c); + event = ZOOM_connection_get_event(c); + if (event) + { + ZOOM_Event_destroy(event); + return 1; + } + return 0; +} + +ZOOM_API(int) + ZOOM_event_nonblock(int no, ZOOM_connection *cs) { int i; - yaz_log(log_details, "ZOOM_event_poll(no=%d,cs=%p)", no, cs); + yaz_log(log_details, "ZOOM_process_event(no=%d,cs=%p)", no, cs); for (i = 0; i