From: Adam Dickmeiss Date: Wed, 7 Apr 2010 11:37:26 +0000 (+0200) Subject: Make ZOOM_connection_exec_task public X-Git-Tag: v4.0.3~10 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=5b61e9a2d6be8eddb62af8cc626dc1e98596cc7f;p=yaz-moved-to-github.git Make ZOOM_connection_exec_task public This function, unlike ZOOM_connection_process and ZOOM_event_nonblock, do not process any events. --- diff --git a/include/yaz/zoom.h b/include/yaz/zoom.h index 1f0e3c4..14247a3 100644 --- a/include/yaz/zoom.h +++ b/include/yaz/zoom.h @@ -416,6 +416,20 @@ ZOOM_API(int) ZOOM_connection_process(ZOOM_connection c); +/** \brief executes non-blocking tasks for connection + \param c connection + \retval 0 no task was executed + \retval 1 task was executed (but probably not completed) + + This function, unlike, ZOOM_connection_process, does not try to + return any events (and remove them). But events may be generated + from it. These are saved and may later be retrieved with + ZOOM_connection_process and ZOOM_connection_last_event . +*/ +ZOOM_API(int) +ZOOM_connection_exec_task(ZOOM_connection c); + + /** \brief get socket fd for ZOOM connection \param c connection \retval -1 no socket assigned for connection @@ -477,7 +491,6 @@ ZOOM_API(int) ZOOM_connection_fire_event_socket(ZOOM_connection c, int mask); - /** \brief peek at next event \param c connection \returns ZOOM_EVENT_NONE (for no events in queue), ZOOM_EVENT_CONNECT, .. diff --git a/src/zoom-c.c b/src/zoom-c.c index 684d1b6..24e6ad4 100644 --- a/src/zoom-c.c +++ b/src/zoom-c.c @@ -349,8 +349,6 @@ void ZOOM_connection_remove_task(ZOOM_connection c) } } -static int ZOOM_connection_exec_task(ZOOM_connection c); - void ZOOM_connection_remove_tasks(ZOOM_connection c) { while (c->tasks) @@ -3612,7 +3610,8 @@ ZOOM_API(void) ZOOM_options_setl(p->options, key, val, len); } -static int ZOOM_connection_exec_task(ZOOM_connection c) +ZOOM_API(int) + ZOOM_connection_exec_task(ZOOM_connection c) { ZOOM_task task = c->tasks; zoom_ret ret = zoom_complete;