From 47f3b538db5374f0b9cc9dc334e851a0542d2d2c Mon Sep 17 00:00:00 2001 From: Sebastian Hammer Date: Sun, 4 Feb 2007 02:24:56 +0000 Subject: [PATCH] Fixed overly ambitional conditional which led to incorrect handling of retrieval/backend sub-element --- src/retrieval.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/retrieval.c b/src/retrieval.c index f9e5116..6b64b92 100644 --- a/src/retrieval.c +++ b/src/retrieval.c @@ -2,7 +2,7 @@ * Copyright (C) 2005-2007, Index Data ApS * See the file LICENSE for details. * - * $Id: retrieval.c,v 1.15 2007-01-03 08:42:15 adam Exp $ + * $Id: retrieval.c,v 1.16 2007-02-04 02:24:56 quinn Exp $ */ /** * \file retrieval.c @@ -166,8 +166,9 @@ static int conf_retrieval(yaz_retrieval_t p, const xmlNode *ptr) el->record_conv = 0; /* OK to have no 'backend' sub content */ for (ptr = ptr->children; ptr; ptr = ptr->next) { - if (ptr->type == XML_ELEMENT_NODE - && 0 != strcmp((const char *) ptr->name, "backend")){ + if (ptr->type != XML_ELEMENT_NODE) + continue; + if (strcmp((const char *) ptr->name, "backend")){ wrbuf_printf(p->wr_error, "Element : expected" " zero or one element , got <%s>", (const char *) ptr->name); -- 1.7.10.4