Lookup operations by saved connid.

We reset the connection pointer on a destruction attempt, avoid the
spurious asserts.
This commit is contained in:
Ondřej Kuzník 2017-05-18 16:28:55 +01:00 committed by Ondřej Kuzník
parent f4afc06920
commit cf05722b6c
2 changed files with 4 additions and 4 deletions

View File

@ -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;

View File

@ -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;