X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=src%2Ffilter_multi.cpp;h=5f7d1b5bb7b8c0d9d0c0e1df7ab31fa3369db128;hb=efd02482054ac750a9dcd3d10fa349e26c5e7e65;hp=f34731fd942e1b220e41235b6feb0808ba3d6331;hpb=884948918b1336f7cda40ec639f42d95183faa65;p=metaproxy-moved-to-github.git diff --git a/src/filter_multi.cpp b/src/filter_multi.cpp index f34731f..5f7d1b5 100644 --- a/src/filter_multi.cpp +++ b/src/filter_multi.cpp @@ -1,5 +1,5 @@ /* This file is part of Metaproxy. - Copyright (C) 2005-2013 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 @@ -678,7 +678,7 @@ void yf::Multi::Frontend::search(mp::Package &package, Z_APDU *apdu_req) Z_APDU *f_apdu = odr.create_searchResponse(apdu_req, 0, 0); Z_SearchResponse *f_resp = f_apdu->u.searchResponse; - yaz_log(YLOG_LOG, "no_successful=%d is_closed=%s hide_errors=%s", + yaz_log(YLOG_DEBUG, "no_successful=%d is_closed=%s hide_errors=%s", no_successful, close_p ? "true" : "false", m_p->m_hide_errors ? "true" : "false"); @@ -783,7 +783,7 @@ void yf::Multi::Frontend::present(mp::Package &package, Z_APDU *apdu_req) std::list::const_iterator jit; for (jit = jobs.begin(); jit != jobs.end(); jit++) { - yaz_log(YLOG_LOG, "job pos=%d", jit->m_pos); + yaz_log(YLOG_DEBUG, "job pos=%d", jit->m_pos); } } @@ -957,15 +957,13 @@ Z_Entry *yf::Multi::ScanTermInfo::get_entry(ODR odr) t->byAttributes = 0; t->otherTermInfo = 0; t->globalOccurrences = odr_intdup(odr, m_count); - t->term = (Z_Term *) - odr_malloc(odr, sizeof(*t->term)); + t->term = (Z_Term *) odr_malloc(odr, sizeof(*t->term)); t->term->which = Z_Term_general; - Odr_oct *o; - t->term->u.general = o = (Odr_oct *)odr_malloc(odr, sizeof(Odr_oct)); - - o->len = o->size = m_norm_term.size(); - o->buf = (unsigned char *) odr_malloc(odr, o->len); - memcpy(o->buf, m_norm_term.c_str(), o->len); + t->term->u.general = odr_create_Odr_oct(odr, +#if YAZ_VERSIONL < 0x50000 + (unsigned char *) +#endif + m_norm_term.c_str(), m_norm_term.size()); return e; }