projects
/
pazpar2-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/pazpar2
[pazpar2-moved-to-github.git]
/
src
/
session.c
diff --git
a/src/session.c
b/src/session.c
index
5302971
..
61f7e54
100644
(file)
--- a/
src/session.c
+++ b/
src/session.c
@@
-981,7
+981,10
@@
static int get_mergekey_from_doc(xmlDoc *doc, xmlNode *root, const char *name,
if (!strcmp((const char *) n->name, "metadata"))
{
xmlChar *type = xmlGetProp(n, (xmlChar *) "type");
if (!strcmp((const char *) n->name, "metadata"))
{
xmlChar *type = xmlGetProp(n, (xmlChar *) "type");
- if (!strcmp(name, (const char *) type))
+ if (type == NULL) {
+ yaz_log(YLOG_FATAL, "Missing type attribute on metadata element. Skipping!");
+ }
+ else if (!strcmp(name, (const char *) type))
{
xmlChar *value = xmlNodeListGetString(doc, n->children, 1);
if (value)
{
xmlChar *value = xmlNodeListGetString(doc, n->children, 1);
if (value)