* OF THIS SOFTWARE.
*
* $Log: backend.h,v $
- * Revision 1.19 1998-03-31 11:07:45 adam
+ * Revision 1.20 1998-05-27 16:57:06 adam
+ * Support for surrogate diagnostic records added for bend_fetch.
+ *
+ * Revision 1.19 1998/03/31 11:07:45 adam
* Furhter work on UNIverse resource report.
* Added Extended Services handling in frontend server.
*
int number; /* record number */
oid_value format; /* One of the CLASS_RECSYN members */
Z_RecordComposition *comp; /* Formatting instructions */
- ODR stream; /* encoding stream - memory source if required */
+ ODR stream; /* encoding stream - memory source if req */
+ int surrogate_flag; /* surrogate diagnostic flag (rw) */
} bend_fetchrequest;
typedef struct
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: seshigh.c,v $
- * Revision 1.75 1998-05-18 10:13:07 adam
+ * Revision 1.76 1998-05-27 16:57:07 adam
+ * Support for surrogate diagnostic records added for bend_fetch.
+ *
+ * Revision 1.75 1998/05/18 10:13:07 adam
* Fixed call to es_request handler - extra argument was passed.
*
* Revision 1.74 1998/03/31 15:13:20 adam
* surrogate diagnostic.
*/
static Z_NamePlusRecord *surrogatediagrec(association *assoc, char *dbname,
- int error, char *addinfo)
+ int error, char *addinfo)
{
int oid[OID_SIZE];
Z_NamePlusRecord *rec = (Z_NamePlusRecord *)odr_malloc (assoc->encode, sizeof(*rec));
bend_fetchresult *fres;
Z_NamePlusRecord *thisrec;
Z_DatabaseRecord *thisext;
- int this_length;
+ int this_length = 0;
/*
* we get the number of bytes allocated on the stream before any
freq.comp = comp;
freq.format = format;
freq.stream = a->encode;
+ freq.surrogate_flag = 0;
if (!(fres = bend_fetch(a->backend, &freq, 0)))
{
*pres = Z_PRES_FAILURE;
or only pertaining to current record */
if (fres->errcode)
{
- *pres = Z_PRES_FAILURE;
- return diagrec(a, fres->errcode, fres->errstring);
+ if (!freq.surrogate_flag)
+ {
+ *pres = Z_PRES_FAILURE;
+ return diagrec(a, fres->errcode, fres->errstring);
+ }
+ reclist->records[reclist->num_records] =
+ surrogatediagrec(a, fres->basename, fres->errcode,
+ fres->errstring);
+ reclist->num_records++;
+ *next = fres->last_in_set ? 0 : recno + 1;
+ continue;
}
if (fres->len >= 0)
this_length = fres->len;
continue;
}
}
+
if (!(thisrec = (Z_NamePlusRecord *)odr_malloc(a->encode, sizeof(*thisrec))))
return 0;
if (!(thisrec->databaseName = (char *)odr_malloc(a->encode,