projects
/
pazpar2-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Mangle ZOOM_resultset in client_set_connection
[pazpar2-moved-to-github.git]
/
src
/
client.c
diff --git
a/src/client.c
b/src/client.c
index
26d5fae
..
6f0941a
100644
(file)
--- 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;
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;
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)
{
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);
if (con)
{
assert(cl->connection == 0);