Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Joe Martin
OpenLDAP
Commits
88390159
Commit
88390159
authored
Jun 23, 2017
by
Ondřej Kuzník
Committed by
Ondřej Kuzník
Nov 17, 2020
Browse files
On connection shutdown, free op from the correct side
parent
37cff373
Changes
1
Hide whitespace changes
Inline
Side-by-side
servers/lloadd/operation.c
View file @
88390159
...
@@ -652,11 +652,29 @@ done:
...
@@ -652,11 +652,29 @@ done:
CLIENT_UNLOCK_OR_DESTROY
(
c
);
CLIENT_UNLOCK_OR_DESTROY
(
c
);
}
}
/*
* Upstream is shutting down, signal the client if necessary, but we have to
* call operation_destroy_from_upstream ourselves to detach upstream from the
* op.
*
* Only called from upstream_destroy.
*/
void
void
operation_lost_upstream
(
Operation
*
op
)
operation_lost_upstream
(
Operation
*
op
)
{
{
Connection
*
c
=
op
->
o_upstream
;
CONNECTION_LOCK
(
c
);
op
->
o_upstream_refcnt
++
;
/* Matching the op reference on the connection as well */
CONNECTION_UNLOCK_INCREF
(
c
);
operation_send_reject
(
op
,
LDAP_UNAVAILABLE
,
operation_send_reject
(
op
,
LDAP_UNAVAILABLE
,
"connection to the remote server has been severed"
,
0
);
"connection to the remote server has been severed"
,
0
);
CONNECTION_LOCK_DECREF
(
c
);
op
->
o_upstream_refcnt
--
;
operation_destroy_from_upstream
(
op
);
CONNECTION_UNLOCK
(
c
);
}
}
int
int
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment