X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fzoom-c.c;h=d0f504207daf031b5a8ee358d7e41d253c81b24c;hb=dd6da3de6292dd8d087eac67c0c9a7eced8b88de;hp=a7dced4171470e6c06897c18f69cd3cefd9e1160;hpb=55bc5787ba3e68ae7e130866f95e70af6b98c6d8;p=yaz-moved-to-github.git diff --git a/src/zoom-c.c b/src/zoom-c.c index a7dced4..d0f5042 100644 --- a/src/zoom-c.c +++ b/src/zoom-c.c @@ -406,6 +406,7 @@ ZOOM_API(ZOOM_connection) c->odr_in = odr_createmem(ODR_DECODE); c->odr_out = odr_createmem(ODR_ENCODE); + c->odr_print = 0; c->async = 0; c->support_named_resultsets = 0; @@ -479,6 +480,11 @@ ZOOM_API(void) set_ZOOM_error(c, ZOOM_ERROR_NONE, 0); ZOOM_connection_remove_tasks(c); + if (c->odr_print) + { + odr_setprint(c->odr_print, 0); /* prevent destroy from fclose'ing */ + odr_destroy(c->odr_print); + } if (ZOOM_options_get_bool(c->options, "apdulog", 0)) { c->odr_print = odr_createmem(ODR_PRINT); @@ -3137,7 +3143,7 @@ static Z_ItemOrder *encode_item_order(ZOOM_package p) req->u.esRequest->notToKeep->resultSetItem->resultSetId = odr_strdup(p->odr_out, str); req->u.esRequest->notToKeep->resultSetItem->item = - (int *) odr_malloc(p->odr_out, sizeof(int)); + odr_intdup(p->odr_out, 0); str = ZOOM_options_get(p->options, "itemorder-item"); *req->u.esRequest->notToKeep->resultSetItem->item =