X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fclient.c;h=65400337d0d89c0e117af4da60efec6a2ac62251;hb=99171d27a673a519c1d12e72ad9f46b70cafb387;hp=2ebab5ece6fa842d41982e6b265a1adb1013867c;hpb=cca105c35464171daf2945161bf4f6a0a52a4d52;p=pazpar2-moved-to-github.git diff --git a/src/client.c b/src/client.c index 2ebab5e..6540033 100644 --- a/src/client.c +++ b/src/client.c @@ -78,7 +78,7 @@ static void client_use(int delta) yaz_mutex_enter(g_mutex); no_clients += delta; yaz_mutex_leave(g_mutex); - yaz_log(YLOG_LOG, "%s clients=%d", delta > 0 ? "INC" : "DEC", no_clients); + yaz_log(YLOG_DEBUG, "%s clients=%d", delta > 0 ? "INC" : "DEC", no_clients); } #else #define client_use(x) @@ -638,7 +638,7 @@ void client_unlock(struct client *c) void client_incref(struct client *c) { pazpar2_incref(&c->ref_count, c->mutex); - yaz_log(YLOG_LOG, "client_incref c=%p %s cnt=%d", + yaz_log(YLOG_DEBUG, "client_incref c=%p %s cnt=%d", c, client_get_url(c), c->ref_count); } @@ -646,7 +646,7 @@ int client_destroy(struct client *c) { if (c) { - yaz_log(YLOG_LOG, "client_destroy c=%p %s cnt=%d", + yaz_log(YLOG_DEBUG, "client_destroy c=%p %s cnt=%d", c, client_get_url(c), c->ref_count); if (!pazpar2_decref(&c->ref_count, c->mutex)) { @@ -655,8 +655,11 @@ int client_destroy(struct client *c) xfree(c->cqlquery); c->cqlquery = 0; assert(!c->connection); - assert(!c->resultset); - + + if (c->resultset) + { + ZOOM_resultset_destroy(c->resultset); + } yaz_mutex_destroy(&c->mutex); xfree(c); client_use(-1); @@ -669,10 +672,7 @@ 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; - } + ZOOM_resultset_release(cl->resultset); if (con) { assert(cl->connection == 0);