From cf05722b6c5bd0bee794bb467389279a7a86cda2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Kuzn=C3=ADk?= Date: Thu, 18 May 2017 16:28:55 +0100 Subject: [PATCH] Lookup operations by saved connid. We reset the connection pointer on a destruction attempt, avoid the spurious asserts. --- servers/lloadd/operation.c | 6 +++--- servers/lloadd/upstream.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/servers/lloadd/operation.c b/servers/lloadd/operation.c index 0882222aed..e844ff18ec 100644 --- a/servers/lloadd/operation.c +++ b/servers/lloadd/operation.c @@ -86,7 +86,7 @@ operation_client_cmp( const void *left, const void *right ) { const Operation *l = left, *r = right; - assert( l->o_client == r->o_client ); + assert( l->o_client_connid == r->o_client_connid ); return ( l->o_client_msgid < r->o_client_msgid ) ? -1 : ( l->o_client_msgid > r->o_client_msgid ); @@ -97,7 +97,7 @@ operation_upstream_cmp( const void *left, const void *right ) { const Operation *l = left, *r = right; - assert( l->o_upstream == r->o_upstream ); + assert( l->o_upstream_connid == r->o_upstream_connid ); return ( l->o_upstream_msgid < r->o_upstream_msgid ) ? -1 : ( l->o_upstream_msgid > r->o_upstream_msgid ); @@ -515,7 +515,7 @@ done: int request_abandon( Connection *c, Operation *op ) { - Operation *request, needle = { .o_client = c }; + Operation *request, needle = { .o_client_connid = c->c_connid }; ber_tag_t tag; int rc = LDAP_SUCCESS; diff --git a/servers/lloadd/upstream.c b/servers/lloadd/upstream.c index 6ffbaa078b..afde02e59e 100644 --- a/servers/lloadd/upstream.c +++ b/servers/lloadd/upstream.c @@ -314,7 +314,7 @@ static int handle_one_response( Connection *c ) { BerElement *ber; - Operation *op = NULL, needle = { .o_upstream = c }; + Operation *op = NULL, needle = { .o_upstream_connid = c->c_connid }; OperationHandler handler = NULL; ber_tag_t tag; ber_len_t len;