From: Adam Dickmeiss Date: Fri, 24 Feb 2012 13:46:02 +0000 (+0100) Subject: retrieval: only one section allowed X-Git-Tag: v4.2.27~5 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=e38cab5629e6643d9e1621a697e8ccc8d7822727;p=yaz-moved-to-github.git retrieval: only one section allowed --- diff --git a/src/retrieval.c b/src/retrieval.c index f82f8c7..65c1098 100644 --- a/src/retrieval.c +++ b/src/retrieval.c @@ -180,6 +180,14 @@ static int conf_retrieval(yaz_retrieval_t p, const xmlNode *ptr) else { + if (el->record_conv) + { + wrbuf_printf(p->wr_error, "Element : " + "only one allowed"); + yaz_record_conv_destroy(el->record_conv); + return -1; + } + /* parsing attributees */ struct _xmlAttr *attr; for (attr = ptr->properties; attr; attr = attr->next){ diff --git a/test/test_retrieval.c b/test/test_retrieval.c index 2b971df..a374159 100644 --- a/test/test_retrieval.c +++ b/test/test_retrieval.c @@ -262,6 +262,25 @@ static void tst_configure(void) "Element : Unsupported" " input format defined by attribute value", 0)); + + YAZ_CHECK(conv_configure_test("" + "" + "" + "" + "" + "" + "" + "" + "", + "Element : " + "only one allowed", 0)); + + YAZ_CHECK(conv_configure_test("" "" ""