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
b039e7c1
Commit
b039e7c1
authored
Mar 28, 2018
by
Ondřej Kuzník
Browse files
Keep a reference around for the bind task
parent
0314f95d
Changes
2
Hide whitespace changes
Inline
Side-by-side
servers/lloadd/daemon.c
View file @
b039e7c1
...
...
@@ -1432,13 +1432,7 @@ backend_conn_cb( ldap_pvt_thread_start_t *start, void *startarg, void *arg )
LloadBackend
*
b
=
arg
;
if
(
b
==
NULL
||
c
->
c_private
==
b
)
{
if
(
start
==
upstream_bind
)
{
/* FIXME: is upstream_bind safe without a reference of its own? */
CONNECTION_LOCK
(
c
);
}
else
{
CONNECTION_LOCK_DECREF
(
c
);
}
CONNECTION_DESTROY
(
c
);
CONNECTION_LOCK_DESTROY
(
c
);
return
1
;
}
return
0
;
...
...
servers/lloadd/upstream.c
View file @
b039e7c1
...
...
@@ -361,7 +361,7 @@ upstream_bind( void *ctx, void *arg )
BerElement
*
ber
;
ber_int_t
msgid
;
CONNECTION_LOCK
(
c
);
CONNECTION_LOCK
_DECREF
(
c
);
c
->
c_pdu_cb
=
upstream_bind_cb
;
CONNECTION_UNLOCK_INCREF
(
c
);
...
...
@@ -460,6 +460,7 @@ upstream_finish( LloadConnection *c )
b
->
b_last_conn
=
c
;
}
else
{
rc
=
1
;
c
->
c_refcnt
++
;
ldap_pvt_thread_pool_submit
(
&
connection_pool
,
upstream_bind
,
c
);
}
...
...
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