X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=index%2Fretrieve.c;h=5b602ed19f532cb2353341994978c09651fcd517;hb=0ef68e6e54cfd7a91a28ee3b1f305924ac34e787;hp=e10047e7e1d7cc18b37e7944917d2b9e7dee906a;hpb=617e9bf364131235f70aedd813fedabe278a061c;p=idzebra-moved-to-github.git diff --git a/index/retrieve.c b/index/retrieve.c index e10047e..5b602ed 100644 --- a/index/retrieve.c +++ b/index/retrieve.c @@ -249,7 +249,7 @@ int zebra_special_sort_fetch( else { char dst_buf[IT_MAX_WORD]; - char str[IT_MAX_WORD]; + WRBUF str = wrbuf_alloc(); const char *index_type; const char *db = 0; const char *string_index = 0; @@ -261,7 +261,7 @@ int zebra_special_sort_fetch( zebraExplain_lookup_ord(zh->reg->zei, ord, &index_type, &db, &string_index); - zebra_term_untrans(zh, index_type, dst_buf, str); + zebra_term_untrans(zh, index_type, dst_buf, wrbuf_cstr(str)); if (!oid_oidcmp(input_format, yaz_oid_recsyn_xml)) { @@ -285,6 +285,7 @@ int zebra_special_sort_fetch( wrbuf_printf(wrbuf, "%s %s %s\n", string_index, index_type, dst_buf); } + wrbuf_destroy(str); return 0; } } @@ -571,7 +572,7 @@ static int snippet_fetch( /* for debugging purposes */ yaz_log(YLOG_LOG, "---------------------------"); yaz_log(YLOG_LOG, "REC SNIPPET:"); - zebra_snippets_log(rec_snippet, YLOG_LOG, 1); + zebra_snippets_log(rec_snippets, YLOG_LOG, 1); yaz_log(YLOG_LOG, "---------------------------"); yaz_log(YLOG_LOG, "HIT SNIPPET:"); zebra_snippets_log(hit_snippet, YLOG_LOG, 1);