X-Git-Url: http://lists.indexdata.dk/cgi-bin?a=blobdiff_plain;f=src%2Ffilter_zoom.cpp;h=e8e16816df2314ff0546b9f85afbff117a38ce04;hb=e55d02d0c0a3d7c2f17fa224442478d2bfde501c;hp=d67c97cab44474b1ebbb17686fc3d4dcc1cacbf0;hpb=b561cc43d3194c3dbd7d95316d6ad51fc2d673dd;p=metaproxy-moved-to-github.git diff --git a/src/filter_zoom.cpp b/src/filter_zoom.cpp index d67c97c..e8e1681 100644 --- a/src/filter_zoom.cpp +++ b/src/filter_zoom.cpp @@ -322,7 +322,7 @@ void yf::Zoom::Backend::connect(std::string zurl, int *error, char **addinfo, ODR odr) { - ZOOM_connection_connect(m_connection, zurl.c_str(), 0); + ZOOM_connection_connect(m_connection, zurl.length() ? zurl.c_str() : 0, 0); get_zoom_error(error, addinfo, odr); } @@ -872,7 +872,10 @@ yf::Zoom::BackendPtr yf::Zoom::Frontend::get_backend_from_databases( std::list::const_iterator map_it; if (m_backend && !m_backend->enable_explain && m_backend->m_frontend_database == database) + { + m_backend->connect("", error, addinfo, odr); return m_backend; + } std::string input_args; std::string torus_db; @@ -1933,7 +1936,7 @@ next_proxy: wrbuf_destroy(ccl_wrbuf); if (!cn) { - char *addinfo = odr_strdup(odr, ccl_err_msg(cerror)); + char *addinfo = odr_strdup_null(odr, ccl_err_msg(cerror)); error = YAZ_BIB1_MALFORMED_QUERY; switch (cerror)