/*
* Europagate, 1995
*
+ * Z39.50 API for the Email gateway
+ *
* $Log: zaccess.c,v $
- * Revision 1.11 1995/02/20 18:58:05 quinn
+ * Revision 1.15 1995/04/17 11:26:55 quinn
+ * Added YAZ version of zaccess
+ *
+ * Revision 1.14 1995/02/23 08:32:26 adam
+ * Changed header.
+ *
+ * Revision 1.12 1995/02/20 20:35:37 quinn
+ * Pull present status from presresp.
+ *
+ * Revision 1.11 1995/02/20 18:58:05 quinn
* Added hack for record in ANY
*
* Revision 1.10 1995/02/20 18:19:30 quinn
PINITREQUEST ireq;
PINITRESPONSE ires;
int len;
+ char name[512];
if (!(p = malloc(sizeof(*p))))
{
}
gw_log(ZASS_DEBUG, ZASS_TYPE, "Opened connection to %s:%d", p->ass->HostName,
p->ass->Port);
+ sprintf(name, "%s (ZDIST protocol layer)", ZASS_NAME);
ireq = InitRequest_CreateInitAllASCII(0, "yy", "yy", p->maxrecordsize,
- p->preferredmessagesize, ZASS_ID, ZASS_NAME, ZASS_VERSION, 0);
+ p->preferredmessagesize, ZASS_ID, name, ZASS_VERSION, 0);
if (!ireq)
{
gw_log(GW_LOG_FATAL, "ZASS_TYPE", "failed to create initrequest");
}
gw_log(ZASS_DEBUG, ZASS_TYPE, "Got presentresponse");
r.num += PresentResponse_GetNumberOfRecordsReturned(pdu);
+ r.presentstatus = PresentResponse_GetPresentStatus(pdu);
if (r.num == 0)
{
gw_log(GW_LOG_WARN, ZASS_TYPE, "Got 0 records from target.");
}
PresentResponse_Destroy(pdu);
}
- while (num - r.num);
+ while (num - r.num && start);
*rec = 0;
return &r;