projects
/
pazpar2-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
1416c7b
)
Fixed record offset in handling of raw records
author
Adam Dickmeiss
<adam@indexdata.dk>
Mon, 21 Jul 2008 18:00:57 +0000
(20:00 +0200)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Mon, 21 Jul 2008 18:00:57 +0000
(20:00 +0200)
src/client.c
patch
|
blob
|
history
diff --git
a/src/client.c
b/src/client.c
index
c978474
..
603ee21
100644
(file)
--- a/
src/client.c
+++ b/
src/client.c
@@
-430,23
+430,27
@@
void client_record_response(struct client *cl)
}
else
{
}
else
{
- ZOOM_record rec;
- int offset = cl->records;
+ ZOOM_record rec = 0;
const char *msg, *addinfo;
const char *msg, *addinfo;
-
- if ((rec = ZOOM_resultset_record(resultset, offset)))
+
+ yaz_log(YLOG_LOG, "show_raw=%p show_raw->active=%d",
+ cl->show_raw, cl->show_raw ? cl->show_raw->active : 0);
+ if (cl->show_raw && cl->show_raw->active)
{
{
- yaz_log(YLOG_LOG, "Record with offset %d", offset);
-
- yaz_log(YLOG_LOG, "show_raw=%p show_raw->active=%d",
- cl->show_raw, cl->show_raw ? cl->show_raw->active : 0);
- if (cl->show_raw && cl->show_raw->active)
+ if ((rec = ZOOM_resultset_record(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);
}
- else
+ }
+ else
+ {
+ int offset = cl->records;
+ if ((rec = ZOOM_resultset_record(resultset, offset)))
{
{
+ yaz_log(YLOG_LOG, "Record with offset %d", offset);
+
cl->records++;
if (ZOOM_record_error(rec, &msg, &addinfo, 0))
yaz_log(YLOG_WARN, "Record error %s (%s): %s (rec #%d)",
cl->records++;
if (ZOOM_record_error(rec, &msg, &addinfo, 0))
yaz_log(YLOG_WARN, "Record error %s (%s): %s (rec #%d)",
@@
-479,7
+483,7
@@
void client_record_response(struct client *cl)
}
}
}
}
- else
+ if (!rec)
yaz_log(YLOG_WARN, "Expected record, but got NULL");
}
}
yaz_log(YLOG_WARN, "Expected record, but got NULL");
}
}