Pazpar2 is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Pazpar2 is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
void (*error_handler)(void *data, const char *addinfo);
void (*record_handler)(void *data, const char *buf, size_t sz);
void *data;
void (*error_handler)(void *data, const char *addinfo);
void (*record_handler)(void *data, const char *buf, size_t sz);
void *data;
static void client_show_immediate(
ZOOM_resultset resultset, struct session_database *sdb, int position,
void *data,
void (*error_handler)(void *data, const char *addinfo),
void (*record_handler)(void *data, const char *buf, size_t sz),
static void client_show_immediate(
ZOOM_resultset resultset, struct session_database *sdb, int position,
void *data,
void (*error_handler)(void *data, const char *addinfo),
void (*record_handler)(void *data, const char *buf, size_t sz),
void (*error_handler)(void *data, const char *addinfo),
void (*record_handler)(void *data, const char *buf,
size_t sz),
void (*error_handler)(void *data, const char *addinfo),
void (*record_handler)(void *data, const char *buf,
size_t sz),
if (syntax == 0 && esn == 0)
client_show_immediate(cl->resultset, client_get_database(cl),
position, data,
error_handler, record_handler,
if (syntax == 0 && esn == 0)
client_show_immediate(cl->resultset, client_get_database(cl),
position, data,
error_handler, record_handler,
yaz_snprintf(type, 80, "txml; charset=%s", cp ? cp+1 : "marc-8s");
}
else
yaz_snprintf(type, 80, "txml; charset=%s", cp ? cp+1 : "marc-8s");
}
else
- if (cl->show_raw->binary)
- strcpy(type, "raw");
- else
- {
- struct session_database *sdb = client_get_database(cl);
- nativesyntax_to_type(sdb, type, rec);
- }
-
+ nativesyntax_to_type(cl->show_raw->nativesyntax, type, rec);
buf = ZOOM_record_get(rec, type, &len);
cl->show_raw->record_handler(cl->show_raw->data, buf, len);
client_show_raw_dequeue(cl);
buf = ZOOM_record_get(rec, type, &len);
cl->show_raw->record_handler(cl->show_raw->data, buf, len);
client_show_raw_dequeue(cl);
else if (ZOOM_record_error(rec, &msg, &addinfo, 0))
{
yaz_log(YLOG_WARN, "Record error %s (%s): %s (rec #%d)",
else if (ZOOM_record_error(rec, &msg, &addinfo, 0))
{
yaz_log(YLOG_WARN, "Record error %s (%s): %s (rec #%d)",
- if (nativesyntax_to_type(sdb, type, rec))
+ const char *s = session_setting_oneval(sdb, PZ_NATIVESYNTAX);
+ if (nativesyntax_to_type(s, type, rec))
yaz_log(YLOG_WARN, "Failed to determine record type");
xmlrec = ZOOM_record_get(rec, type, NULL);
if (!xmlrec)
yaz_log(YLOG_WARN, "Failed to determine record type");
xmlrec = ZOOM_record_get(rec, type, NULL);
if (!xmlrec)
- if ((rec = ZOOM_resultset_record(resultset,
- cl->show_raw->position-1)))
+ if ((rec = ZOOM_resultset_record_immediate(
+ resultset, cl->show_raw->position-1)))
{
cl->show_raw->active = 0;
ingest_raw_record(cl, rec);
{
cl->show_raw->active = 0;
ingest_raw_record(cl, rec);
yaz_log(YLOG_LOG, "Target %s has preferred status: %d",
client_get_id(cl), cl->preferred);
}
yaz_log(YLOG_LOG, "Target %s has preferred status: %d",
client_get_id(cl), cl->preferred);
}
if (p && !strcmp(p + 1, name) && s->value &&
!strncmp(s->value, "local:", 6))
{
if (p && !strcmp(p + 1, name) && s->value &&
!strncmp(s->value, "local:", 6))
{
nmem_strsplit_escape2(nmem, "|", value, values,
num, 1, '\\', 1);
(*l)++;
nmem_strsplit_escape2(nmem, "|", value, values,
num, 1, '\\', 1);
(*l)++;