From: Adam Dickmeiss Date: Thu, 15 Apr 2010 13:06:14 +0000 (+0200) Subject: Mangle ZOOM_resultset in client_set_connection X-Git-Tag: v1.4.0~39 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=28aa5f1d51289406432ce995f435a9977c10f744;p=pazpar2-moved-to-github.git Mangle ZOOM_resultset in client_set_connection The ZOOM resultset is now reset in client_set_connection rather than being destroyed in client_destroy. --- 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);