appropriate.
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: zebraapi.c,v $
- * Revision 1.2 1998-05-20 10:12:19 adam
+ * Revision 1.3 1998-05-27 16:57:44 adam
+ * Zebra returns surrogate diagnostic for single records when
+ * appropriate.
+ *
+ * Revision 1.2 1998/05/20 10:12:19 adam
* Implemented automatic EXPLAIN database maintenance.
* Modified Zebra to work with ASN.1 compiled version of YAZ.
*
ZebraPosSet poset;
int i, *pos_array;
+ zh->errCode = 0;
pos_array = xmalloc (sizeof(*pos_array));
for (i = 0; i<num_recs; i++)
pos_array[i] = recs[i].position;
}
else
{
- zh->errCode =
+ recs[i].errCode =
zebra_record_fetch (zh, poset[i].sysno, poset[i].score,
stream, input_format, comp,
&recs[i].format, &recs[i].buf,
&recs[i].len,
&recs[i].base);
+ recs[i].errString = NULL;
}
}
zebraPosSetDestroy (zh, poset, num_recs);
int *position, int *num_entries, ZebraScanEntry **entries,
int *is_partial)
{
+ zh->errCode = 0;
zebra_register_lock (zh);
rpn_scan (zh, stream, zapt, attributeset,
num_bases, basenames, position,
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: zserver.c,v $
- * Revision 1.57 1998-04-03 14:45:18 adam
+ * Revision 1.58 1998-05-27 16:57:46 adam
+ * Zebra returns surrogate diagnostic for single records when
+ * appropriate.
+ *
+ * Revision 1.57 1998/04/03 14:45:18 adam
* Fixed setting of last_in_set in bend_fetch.
*
* Revision 1.56 1998/03/05 08:45:13 adam
r->last_in_set = 0;
zebra_records_retrieve (zh, q->stream, q->setname, q->comp,
q->format, 1, &retrievalRecord);
-
- if (zh->errCode)
+ if (zh->errCode) /* non Surrogate Diagnostic */
{
r->errcode = zh->errCode;
r->errstring = zh->errString;
}
- else
+ else if (retrievalRecord.errCode) /* Surrogate Diagnostic */
+ {
+ q->surrogate_flag = 1;
+ r->errcode = retrievalRecord.errCode;
+ r->errstring = retrievalRecord.errString;
+ r->basename = retrievalRecord.base;
+ }
+ else /* Database Record */
{
r->errcode = 0;
r->basename = retrievalRecord.base;
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: zserver.h,v $
- * Revision 1.31 1998-05-20 10:12:23 adam
+ * Revision 1.32 1998-05-27 16:57:47 adam
+ * Zebra returns surrogate diagnostic for single records when
+ * appropriate.
+ *
+ * Revision 1.31 1998/05/20 10:12:23 adam
* Implemented automatic EXPLAIN database maintenance.
* Modified Zebra to work with ASN.1 compiled version of YAZ.
*
const char *setname);
typedef struct {
+ int errCode;
+ char *errString;
int position;
char *buf;
int len;