* Copyright (C) 1995-2005, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: zoom-c.c,v 1.79 2006-06-16 10:20:17 adam Exp $
+ * $Id: zoom-c.c,v 1.80 2006-06-16 12:34:32 adam Exp $
*/
/**
* \file zoom-c.c
event->kind = kind;
event->next = 0;
event->prev = 0;
+ yaz_log(log_details, "ZOOM_event_create(%d)", kind);
return event;
}
ZOOM_options_get(c->options, "implementationName"),
odr_prepend(c->odr_out, "ZOOM-C", ireq->implementationName));
- version = odr_strdup(c->odr_out, "$Revision: 1.79 $");
+ version = odr_strdup(c->odr_out, "$Revision: 1.80 $");
if (strlen(version) > 10) /* check for unexpanded CVS strings */
version[strlen(version)-2] = '\0';
ireq->implementationVersion = odr_prepend(c->odr_out,
ZOOM_connection_put_event(c, event);
}
}
- if (i == resultset->count)
+ resultset->start += i;
+ resultset->count -= i;
+
+ if (resultset->count == 0)
return zoom_complete;
}
assert(resultset->query);
record_cache_add (resultset, p->records[i],
i+ resultset->start);
}
+ resultset->count -= i;
+ resultset->start += i;
/* transfer our response to search_nmem .. we need it later */
nmem_transfer (resultset->odr->mem, nmem);
nmem_destroy (nmem);
yaz_log(log_details, "%p send_present no tasks", c);
return zoom_complete;
}
+
switch (c->tasks->which)
{
case ZOOM_TASK_SEARCH:
ZOOM_connection_put_event(c, event);
}
}
- if (i == resultset->count)
+ resultset->start += i;
+ resultset->count -= i;
+
+ if (resultset->count == 0)
{
yaz_log(log_details, "%p send_present skip=%d no more to fetch", c, i);
return zoom_complete;
apdu = zget_APDU(c->odr_out, Z_APDU_presentRequest);
req = apdu->u.presentRequest;
- resultset->start += i;
- resultset->count -= i;
-
if (i)
yaz_log(log_details, "%p send_present skip=%d", c, i);
int i, r, nfds;
int max_fd = 0;
+ yaz_log(log_details, "ZOOM_event no=%d", no);
for (i = 0; i<no; i++)
{
ZOOM_connection c = cs[i];
for (i = 0; i<no; i++)
{
ZOOM_connection c = cs[i];
- ZOOM_Event event;
- if (c && ZOOM_connection_exec_task (c))
+ if (c)
{
+ ZOOM_Event event;
+ ZOOM_connection_exec_task (c);
if ((event = ZOOM_connection_get_event(c)))
{
ZOOM_Event_destroy (event);