From 89929f93f8e83456495d777df76e48cd8c53c265 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Fri, 7 Apr 2006 11:27:24 +0000 Subject: [PATCH] Added a new ZOOM event type ZOOM_EVENT_END which signals no more events to be returned for this connection. --- NEWS | 3 +++ include/yaz/zoom.h | 3 ++- src/zoom-c.c | 10 ++++++++-- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index ee69886..3597881 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,6 @@ +Added a new ZOOM event type ZOOM_EVENT_END which signals no more events +to be returned for this connection. + --- 2.1.16 2006/03/31 Allow multiple languages and charsets to be specified with diff --git a/include/yaz/zoom.h b/include/yaz/zoom.h index 70f7231..8258ef5 100644 --- a/include/yaz/zoom.h +++ b/include/yaz/zoom.h @@ -2,7 +2,7 @@ * Copyright (C) 1995-2005, Index Data ApS * See the file LICENSE for details. * - * $Id: zoom.h,v 1.33 2005-12-21 16:43:13 mike Exp $ + * $Id: zoom.h,v 1.34 2006-04-07 11:27:24 adam Exp $ */ /** * \file zoom.h @@ -127,6 +127,7 @@ ZOOM_connection_last_event(ZOOM_connection cs); #define ZOOM_EVENT_RECV_APDU 7 #define ZOOM_EVENT_RECV_RECORD 8 #define ZOOM_EVENT_RECV_SEARCH 9 +#define ZOOM_EVENT_END 10 /* ----------------------------------------------------------- */ /* result sets */ diff --git a/src/zoom-c.c b/src/zoom-c.c index 78c3948..4173682 100644 --- a/src/zoom-c.c +++ b/src/zoom-c.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2005, Index Data ApS * See the file LICENSE for details. * - * $Id: zoom-c.c,v 1.67 2006-04-01 07:21:12 adam Exp $ + * $Id: zoom-c.c,v 1.68 2006-04-07 11:27:24 adam Exp $ */ /** * \file zoom-c.c @@ -245,6 +245,12 @@ void ZOOM_connection_remove_task (ZOOM_connection c) assert (0); } xfree (task); + + if (!c->tasks) + { + ZOOM_Event event = ZOOM_Event_create(ZOOM_EVENT_END); + ZOOM_connection_put_event(c, event); + } } } @@ -1144,7 +1150,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.67 $"); + version = odr_strdup(c->odr_out, "$Revision: 1.68 $"); if (strlen(version) > 10) /* check for unexpanded CVS strings */ version[strlen(version)-2] = '\0'; ireq->implementationVersion = odr_prepend(c->odr_out, -- 1.7.10.4