}
#endif
-
-static Z_SRW_PDU *ZOOM_srw_get_pdu(ZOOM_connection c, int type) {
+#if YAZ_HAVE_XML2
+static Z_SRW_PDU *ZOOM_srw_get_pdu(ZOOM_connection c, int type)
+{
Z_SRW_PDU *sr = yaz_srw_get_pdu(c->odr_out, type, c->sru_version);
sr->username = c->user;
sr->password = c->password;
return sr;
}
+#endif
#if YAZ_HAVE_XML2
static zoom_ret ZOOM_connection_srw_send_search(ZOOM_connection c)
if (*count < 0)
*count = 0;
- if (res->num_diagnostics > 0)
- set_SRU_error(c, &res->diagnostics[0]);
nmem = odr_extract_mem(c->odr_in);
nmem_transfer(odr_getmem(resultset->odr), nmem);
nmem_destroy(nmem);
- if (*count > 0)
+ if (res->num_diagnostics > 0)
+ set_SRU_error(c, &res->diagnostics[0]);
+ else if (*count > 0)
return ZOOM_connection_srw_send_search(c);
return zoom_complete;
}