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
79f7e79f
Commit
79f7e79f
authored
Mar 16, 2017
by
Ondřej Kuzník
Committed by
Ondřej Kuzník
Nov 17, 2020
Browse files
Set up connections in the worker threads
parent
bf66b48f
Changes
4
Hide whitespace changes
Inline
Side-by-side
servers/lloadd/backend.c
View file @
79f7e79f
...
...
@@ -99,9 +99,10 @@ backend_select( Operation *op )
}
void
*
backend_connect
(
Backend
*
b
)
backend_connect
(
void
*
ctx
,
void
*
arg
)
{
struct
evutil_addrinfo
hints
=
{};
Backend
*
b
=
arg
;
#ifdef LDAP_PF_LOCAL
if
(
b
->
b_proto
==
LDAP_PROTO_IPC
)
{
...
...
servers/lloadd/daemon.c
View file @
79f7e79f
...
...
@@ -1300,10 +1300,7 @@ slapd_daemon( struct event_base *daemon_base )
}
LDAP_STAILQ_FOREACH
(
b
,
&
backend
,
b_next
)
{
rc
=
backend_connect
(
b
);
if
(
rc
)
{
return
rc
;
}
ldap_pvt_thread_pool_submit
(
&
connection_pool
,
backend_connect
,
b
);
}
lloadd_inited
=
1
;
...
...
servers/lloadd/proto-slap.h
View file @
79f7e79f
...
...
@@ -40,7 +40,7 @@ struct config_reply_s; /* config.h */
* backend.c
*/
LDAP_SLAPD_F
(
int
)
backend_connect
(
Backend
*
b
);
LDAP_SLAPD_F
(
void
*
)
backend_connect
(
void
*
ctx
,
void
*
arg
);
/*
* ch_malloc.c
...
...
servers/lloadd/upstream.c
View file @
79f7e79f
...
...
@@ -102,6 +102,8 @@ upstream_destroy( Connection *c )
b
->
b_conns
=
NULL
;
ldap_pvt_thread_mutex_unlock
(
&
b
->
b_lock
);
ldap_pvt_thread_pool_submit
(
&
connection_pool
,
backend_connect
,
b
);
ldap_pvt_thread_mutex_lock
(
&
c
->
c_mutex
);
event_del
(
c
->
c_read_event
);
...
...
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