From e2cda8e171365e13ca393afaa4a5df2fb3a2c5ae Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 11 Sep 2013 11:42:01 +0200 Subject: [PATCH] YAZ 5 updates --- index/zebrasrv.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/index/zebrasrv.c b/index/zebrasrv.c index dc57a48..9d3d771 100644 --- a/index/zebrasrv.c +++ b/index/zebrasrv.c @@ -246,10 +246,11 @@ static void search_terms(ZebraHandle zh, bend_search_rr *r) break; case Z_Term_general: term->which = 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; -- 1.7.10.4