X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fzoom-c.c;h=15047d450a8e40e0986aebc55184a347cc6001c9;hb=41458ee17f8860ec85898ffb81186d2736a5c1aa;hp=3563ab555e2b2f35a881010f5abb245aef2ecd8e;hpb=52741a76f17524da0bc416fe82db69eda7700797;p=yaz-moved-to-github.git diff --git a/src/zoom-c.c b/src/zoom-c.c index 3563ab5..15047d4 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.108 2007-01-12 21:03:31 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.108 $"); if (strlen(version) > 10) /* check for unexpanded CVS strings */ version[strlen(version)-2] = '\0'; ireq->implementationVersion = @@ -4125,41 +4125,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