X-Git-Url: http://sru.miketaylor.org.uk/?a=blobdiff_plain;f=src%2Ffilter_cql_to_rpn.cpp;h=38fb0e068bf918996ac0b429438bd46afef71e6f;hb=8ced8e7b5de3ecba12ac68ce5c5e8cddf40d800f;hp=547a9d3c9c0b2c4e5500e5a412ef0349a92a1616;hpb=4bfec20c393570a81471c644fad6268eed3dba29;p=metaproxy-moved-to-github.git diff --git a/src/filter_cql_to_rpn.cpp b/src/filter_cql_to_rpn.cpp index 547a9d3..38fb0e0 100644 --- a/src/filter_cql_to_rpn.cpp +++ b/src/filter_cql_to_rpn.cpp @@ -1,5 +1,5 @@ /* This file is part of Metaproxy. - Copyright (C) 2005-2011 Index Data + Copyright (C) 2005-2013 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 @@ -51,7 +51,7 @@ namespace metaproxy_1 { // define Pimpl wrapper forwarding to Impl - + yf::CQLtoRPN::CQLtoRPN() : m_p(new Impl) { } @@ -79,7 +79,7 @@ yf::CQLtoRPN::Impl::Impl() } yf::CQLtoRPN::Impl::~Impl() -{ +{ } void yf::CQLtoRPN::Impl::configure(const xmlNode *xmlnode) @@ -90,7 +90,7 @@ void yf::CQLtoRPN::Impl::configure(const xmlNode *xmlnode) */ - + std::string fname; for (xmlnode = xmlnode->children; xmlnode; xmlnode = xmlnode->next) { @@ -111,7 +111,7 @@ void yf::CQLtoRPN::Impl::configure(const xmlNode *xmlnode) } else { - throw mp::filter::FilterException("Bad element " + throw mp::filter::FilterException("Bad element " + std::string((const char *) xmlnode->name)); } @@ -146,17 +146,17 @@ void yf::CQLtoRPN::Impl::process(mp::Package &package) char *addinfo = 0; Z_RPNQuery *rpnquery = 0; mp::odr odr; - + int r = m_cql2rpn.query_transform(sr->query->u.type_104->u.cql, &rpnquery, odr, &addinfo); if (r == -3) { - Z_APDU *f_apdu = + Z_APDU *f_apdu = odr.create_searchResponse( - apdu_req, - YAZ_BIB1_TEMPORARY_SYSTEM_ERROR, - "Missing CQL to RPN configuration"); + apdu_req, + YAZ_BIB1_PERMANENT_SYSTEM_ERROR, + "cql_rpn: missing CQL to RPN configuration"); package.response() = f_apdu; return; } @@ -164,14 +164,14 @@ void yf::CQLtoRPN::Impl::process(mp::Package &package) { int error_code = yaz_diag_srw_to_bib1(r); - Z_APDU *f_apdu = + Z_APDU *f_apdu = odr.create_searchResponse(apdu_req, error_code, addinfo); package.response() = f_apdu; return; } else { // conversion OK - + sr->query->which = Z_Query_type_1; sr->query->u.type_1 = rpnquery; package.request() = gdu;