Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Joe Martin
OpenLDAP
Commits
1ea5ee1f
Commit
1ea5ee1f
authored
Mar 20, 2018
by
Ondřej Kuzník
Browse files
Do not unlock upstream without referencing its dying ops
parent
b1c098ad
Changes
2
Hide whitespace changes
Inline
Side-by-side
servers/lloadd/operation.c
View file @
1ea5ee1f
...
...
@@ -806,16 +806,11 @@ void
operation_lost_upstream
(
LloadOperation
*
op
)
{
LloadConnection
*
c
=
op
->
o_upstream
;
CONNECTION_LOCK
(
c
);
op
->
o_res
=
LLOAD_OP_FAILED
;
op
->
o_upstream_refcnt
++
;
/* Matching the op reference on the connection as well */
CONNECTION_UNLOCK_INCREF
(
c
);
operation_send_reject
(
op
,
LDAP_UNAVAILABLE
,
"connection to the remote server has been severed"
,
0
);
CONNECTION_LOCK
_DECREF
(
c
);
CONNECTION_LOCK
(
c
);
op
->
o_upstream_refcnt
--
;
operation_destroy_from_upstream
(
op
);
CONNECTION_UNLOCK
(
c
);
...
...
servers/lloadd/upstream.c
View file @
1ea5ee1f
...
...
@@ -760,7 +760,7 @@ upstream_destroy( LloadConnection *c )
{
LloadBackend
*
b
=
c
->
c_private
;
struct
event
*
read_event
,
*
write_event
;
TAvlnode
*
root
;
TAvlnode
*
root
,
*
node
;
long
freed
,
executing
;
enum
sc_state
state
;
...
...
@@ -780,6 +780,14 @@ upstream_destroy( LloadConnection *c )
read_event
=
c
->
c_read_event
;
write_event
=
c
->
c_write_event
;
for
(
node
=
tavl_end
(
root
,
TAVL_DIR_LEFT
);
node
;
node
=
tavl_next
(
node
,
TAVL_DIR_RIGHT
)
)
{
LloadOperation
*
op
=
node
->
avl_data
;
op
->
o_res
=
LLOAD_OP_FAILED
;
op
->
o_upstream_refcnt
++
;
}
CONNECTION_UNLOCK_INCREF
(
c
);
freed
=
tavl_free
(
root
,
(
AVL_FREE
)
operation_lost_upstream
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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