projects
/
yaz-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5a945d9
)
ZOOM_record_get returns 0 for bad MARC.
author
Adam Dickmeiss
<adam@indexdata.dk>
Tue, 29 Sep 2009 10:58:40 +0000
(12:58 +0200)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Tue, 29 Sep 2009 10:58:40 +0000
(12:58 +0200)
ZOOM_record_get returns 0 pointer if a MARC record can not be decoded -
unless type desired is "raw". This will prevent type "xml" from
returning ISO2709 .. Which obviously can not be XML parsed.
src/zoom-c.c
patch
|
blob
|
history
diff --git
a/src/zoom-c.c
b/src/zoom-c.c
index
d0f5042
..
e05de20
100644
(file)
--- a/
src/zoom-c.c
+++ b/
src/zoom-c.c
@@
-1971,6
+1971,9
@@
static const char *return_record(ZOOM_record rec, int *len,
charset);
if (ret_buf)
return ret_buf;
+ /* bad ISO2709. Return fail unless raw (ISO2709) is wanted */
+ if (marctype != YAZ_MARC_ISO2709)
+ return 0;
}
return return_string_record(rec, len,
(const char *) r->u.octet_aligned->buf,