From da11b64c59616be495146527a768a0492400b50b Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 30 Aug 2012 15:47:43 +0200 Subject: [PATCH] zoom: Honor extraArgs, strip # in zurl --- src/filter_zoom.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/filter_zoom.cpp b/src/filter_zoom.cpp index 022536d..9de8e6b 100644 --- a/src/filter_zoom.cpp +++ b/src/filter_zoom.cpp @@ -76,6 +76,7 @@ namespace metaproxy_1 { std::string urlRecipe; std::string contentConnector; std::string sortStrategy; + std::string extraArgs; std::string rpn2cql_fname; bool use_turbomarc; bool piggyback; @@ -359,8 +360,12 @@ void yf::Zoom::Backend::connect(std::string zurl, int *error, char **addinfo, ODR odr) { + size_t h = zurl.find_first_of('#'); + if (h != std::string::npos) + zurl.erase(h); ZOOM_connection_connect(m_connection, zurl.length() ? zurl.c_str() : 0, 0); get_zoom_error(error, addinfo, odr); + } void yf::Zoom::Backend::search(ZOOM_query q, Odr_int *hits, @@ -603,6 +608,11 @@ yf::Zoom::SearchablePtr yf::Zoom::Impl::parse_torus_record(const xmlNode *ptr) { s->sortStrategy = mp::xml::get_text(ptr); } + else if (!strcmp((const char *) ptr->name, + "extraArgs")) + { + s->extraArgs = mp::xml::get_text(ptr); + } else if (!strcmp((const char *) ptr->name, "rpn2cql")) s->rpn2cql_fname = mp::xml::get_text(ptr); } @@ -1326,6 +1336,9 @@ yf::Zoom::BackendPtr yf::Zoom::Frontend::get_backend_from_databases( if (sptr->query_encoding.length()) b->set_option("rpnCharset", sptr->query_encoding); + if (sptr->extraArgs.length()) + b->set_option("extraArgs", sptr->extraArgs); + b->set_option("timeout", m_p->zoom_timeout.c_str()); if (m_p->apdu_log) -- 1.7.10.4