From 358e1b7e886e6130547ca28e72e0f7fdb4f1c409 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 4 Oct 2006 16:24:05 +0000 Subject: [PATCH] Implement ZOOM_connection_is_idle. --- include/yaz/zoom.h | 5 ++++- src/zoom-c.c | 9 +++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/include/yaz/zoom.h b/include/yaz/zoom.h index 7c3cb85..b25852b 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.36 2006-06-15 10:34:16 adam Exp $ + * $Id: zoom.h,v 1.37 2006-10-04 16:24:05 adam Exp $ */ /** * \file zoom.h @@ -321,6 +321,9 @@ ZOOM_options_set_int(ZOOM_options opt, const char *name, int value); ZOOM_API(int) ZOOM_event (int no, ZOOM_connection *cs); +ZOOM_API(int) +ZOOM_connection_is_idle(ZOOM_connection cs); + ZOOM_END_CDECL /* * Local variables: diff --git a/src/zoom-c.c b/src/zoom-c.c index 9918ea0..33a14a4 100644 --- a/src/zoom-c.c +++ b/src/zoom-c.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2006, Index Data ApS * See the file LICENSE for details. * - * $Id: zoom-c.c,v 1.90 2006-09-27 11:39:02 adam Exp $ + * $Id: zoom-c.c,v 1.91 2006-10-04 16:24:05 adam Exp $ */ /** * \file zoom-c.c @@ -206,6 +206,11 @@ ZOOM_task ZOOM_connection_add_task(ZOOM_connection c, int which) return *taskp; } +int ZOOM_connection_is_idle(ZOOM_connection c) +{ + return c->tasks ? 0 : 1; +} + ZOOM_task ZOOM_connection_insert_task(ZOOM_connection c, int which) { ZOOM_task task = (ZOOM_task) xmalloc(sizeof(*task)); @@ -1216,7 +1221,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.90 $"); + version = odr_strdup(c->odr_out, "$Revision: 1.91 $"); if (strlen(version) > 10) /* check for unexpanded CVS strings */ version[strlen(version)-2] = '\0'; ireq->implementationVersion = -- 1.7.10.4