X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=blobdiff_plain;f=index%2Fzebrasrv.c;h=2560f4eb82966b4ef0b8dd56229ef8a2c5cbdd4e;hp=182f26503f580d8b25540ad30df2d534ebd44b3f;hb=f3f20a205132c39c9434b10086422c6b49b47faf;hpb=aeea139423b8eaf28a4de53b3d7b2ad1f22284e7 diff --git a/index/zebrasrv.c b/index/zebrasrv.c index 182f265..2560f4e 100644 --- a/index/zebrasrv.c +++ b/index/zebrasrv.c @@ -1,5 +1,5 @@ /* This file is part of the Zebra server. - Copyright (C) 1994-2011 Index Data + Copyright (C) Index Data Zebra 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 @@ -212,7 +212,7 @@ static void search_terms(ZebraHandle zh, bend_search_rr *r) sr->num = no_terms; sr->elements = odr_malloc(r->stream, sr->num * sizeof(*sr->elements)); - for (i = 0; iwhich = Z_Term_general; - term->u.general = odr_malloc(r->stream, sizeof(*term->u.general)); - term->u.general->size = term->u.general->len = len; - term->u.general->buf = odr_malloc(r->stream, len); - memcpy(term->u.general->buf, outbuf, len); + term->u.general = odr_create_Odr_oct(r->stream, +#if YAZ_VERSIONL < 0x50000 + (unsigned char *) +#endif + outbuf, len); break; default: term->which = Z_Term_general;