Fix Metaproxy stops logging after check config failed MP-590
[metaproxy-moved-to-github.git] / src / filter_query_rewrite.cpp
index 6e77295..4828781 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2012 Index Data
+   Copyright (C) Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
@@ -101,12 +101,7 @@ void yf::QueryRewrite::Rep::process(mp::Package &package) const
                 xmlDocPtr doc_input = 0;
                 yaz_query2xml(req->query, &doc_input);
 
-                if (!doc_input)
-                {
-                    error_code = YAZ_BIB1_MALFORMED_QUERY;
-                    addinfo = "converion from Query to XML failed";
-                }
-                else
+                if (doc_input)
                 {
                     xmlDocPtr doc_res = xsltApplyStylesheet(m_stylesheet,
                                                             doc_input, 0);
@@ -125,7 +120,7 @@ void yf::QueryRewrite::Rep::process(mp::Package &package) const
                     xmlFreeDoc(doc_input);
                 }
             }
-            if (charset_to.length() && charset_from.length() &&
+            if (!error_code && charset_to.length() && charset_from.length() &&
                 (req->query->which == Z_Query_type_1
                  || req->query->which == Z_Query_type_101))
             {