From 28aa5f1d51289406432ce995f435a9977c10f744 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 15 Apr 2010 15:06:14 +0200 Subject: [PATCH] Mangle ZOOM_resultset in client_set_connection The ZOOM resultset is now reset in client_set_connection rather than being destroyed in client_destroy. --- src/client.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/client.c b/src/client.c index 26d5fae..6f0941a 100644 --- a/src/client.c +++ b/src/client.c @@ -633,8 +633,9 @@ int client_destroy(struct client *c) c->pquery = 0; xfree(c->cqlquery); c->cqlquery = 0; - - ZOOM_resultset_destroy(c->resultset); + assert(!c->connection); + assert(!c->resultset); + yaz_mutex_destroy(&c->mutex); xfree(c); return 1; @@ -645,6 +646,11 @@ int client_destroy(struct client *c) void client_set_connection(struct client *cl, struct connection *con) { + if (cl->resultset) + { + ZOOM_resultset_destroy(cl->resultset); + cl->resultset = 0; + } if (con) { assert(cl->connection == 0); -- 1.7.10.4