* Sebastian Hammer, Adam Dickmeiss
*
* $Log: seshigh.c,v $
- * Revision 1.48 1995-10-06 08:51:20 quinn
+ * Revision 1.52 1995-11-01 12:19:13 quinn
+ * Second attempt to fix same bug.
+ *
+ * Revision 1.50 1995/10/25 16:58:32 quinn
+ * Simple.
+ *
+ * Revision 1.49 1995/10/16 13:51:53 quinn
+ * Changes to provide Especs to the backend.
+ *
+ * Revision 1.48 1995/10/06 08:51:20 quinn
* Added Write-buffer.
*
* Revision 1.47 1995/08/29 14:24:16 quinn
odr_setbuf(assoc->decode, assoc->input_buffer, res, 0);
if (!z_APDU(assoc->decode, &req->request, 0))
{
- logf(LOG_LOG, "ODR error on incoming PDU: %s",
- odr_errlist[odr_geterror(assoc->decode)]);
+ logf(LOG_LOG, "ODR error on incoming PDU: %s [near byte %d] ",
+ odr_errlist[odr_geterror(assoc->decode)],
+ odr_offset(assoc->decode));
logf(LOG_LOG, "PDU dump:");
odr_dumpBER(log_file(), assoc->input_buffer, res);
do_close(assoc, Z_Close_protocolError, "Malformed package");
#define MAX_RECORDS 256
static Z_Records *pack_records(association *a, char *setname, int start,
- int *num, Z_ElementSetNames *esn,
+ int *num, Z_RecordComposition *comp,
int *next, int *pres, oid_value format)
{
int recno, total_length = 0, toget = *num;
}
freq.setname = setname;
freq.number = recno;
+ freq.comp = comp;
freq.format = format;
freq.stream = a->encode;
if (!(fres = bend_fetch(a->backend, &freq, 0)))
else
{
static int toget;
- Z_ElementSetNames *setnames;
+ Z_RecordComposition comp, *compp = 0;
static int presst = 0;
resp.records = 0;
resp.resultCount = &bsrt->hits;
+ comp.which = Z_RecordComp_simple;
/* how many records does the user agent want, then? */
if (bsrt->hits <= *req->smallSetUpperBound)
{
toget = bsrt->hits;
- setnames = req->smallSetElementSetNames;
+ if ((comp.u.simple = req->smallSetElementSetNames))
+ compp = ∁
}
else if (bsrt->hits < *req->largeSetLowerBound)
{
toget = *req->mediumSetPresentNumber;
if (toget > bsrt->hits)
toget = bsrt->hits;
- setnames = req->mediumSetElementSetNames;
+ if ((comp.u.simple = req->mediumSetElementSetNames))
+ compp = ∁
}
else
toget = 0;
else
form = prefformat->value;
resp.records = pack_records(assoc, req->resultSetName, 1,
- &toget, setnames, &next, &presst, form);
+ &toget, compp, &next, &presst, form);
if (!resp.records)
return 0;
resp.numberOfRecordsReturned = &toget;
form = prefformat->value;
num = *req->numberOfRecordsRequested;
resp.records = pack_records(assoc, req->resultSetId,
- *req->resultSetStartPoint, &num, 0, &next, &presst, form);
+ *req->resultSetStartPoint, &num, req->recordComposition, &next,
+ &presst, form);
if (!resp.records)
return 0;
resp.numberOfRecordsReturned = #