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
orbea -
OpenLDAP
Commits
e9fa4af4
Commit
e9fa4af4
authored
Feb 11, 2019
by
Nadezhda Ivanova
Committed by
Quanah Gibson-Mount
Feb 28, 2019
Browse files
Move initialization of Connection mutexes to connections_init
parent
81588880
Changes
1
Hide whitespace changes
Inline
Side-by-side
servers/slapd/connection.c
View file @
e9fa4af4
...
...
@@ -122,7 +122,13 @@ int connections_init(void)
assert
(
connections
[
0
].
c_struct_state
==
SLAP_C_UNINITIALIZED
);
assert
(
connections
[
dtblsize
-
1
].
c_struct_state
==
SLAP_C_UNINITIALIZED
);
for
(
i
=
0
;
i
<
dtblsize
;
i
++
)
connections
[
i
].
c_conn_idx
=
i
;
for
(
i
=
0
;
i
<
dtblsize
;
i
++
)
{
connections
[
i
].
c_conn_idx
=
i
;
ldap_pvt_thread_mutex_init
(
&
connections
[
i
].
c_mutex
);
ldap_pvt_thread_mutex_init
(
&
connections
[
i
].
c_write1_mutex
);
ldap_pvt_thread_cond_init
(
&
connections
[
i
].
c_write1_cv
);
}
/*
* per entry initialization of the Connection array initialization
...
...
@@ -350,6 +356,8 @@ Connection * connection_init(
assert
(
s
>=
0
);
assert
(
s
<
dtblsize
);
c
=
&
connections
[
s
];
ldap_pvt_thread_mutex_lock
(
&
c
->
c_mutex
);
if
(
c
->
c_struct_state
==
SLAP_C_UNINITIALIZED
)
{
doinit
=
1
;
}
else
{
...
...
@@ -397,11 +405,6 @@ Connection * connection_init(
c
->
c_currentber
=
NULL
;
/* should check status of thread calls */
ldap_pvt_thread_mutex_init
(
&
c
->
c_mutex
);
ldap_pvt_thread_mutex_init
(
&
c
->
c_write1_mutex
);
ldap_pvt_thread_cond_init
(
&
c
->
c_write1_cv
);
#ifdef LDAP_SLAPI
if
(
slapi_plugins_used
)
{
slapi_int_create_object_extensions
(
SLAPI_X_EXT_CONNECTION
,
c
);
...
...
@@ -409,8 +412,6 @@ Connection * connection_init(
#endif
}
ldap_pvt_thread_mutex_lock
(
&
c
->
c_mutex
);
assert
(
BER_BVISNULL
(
&
c
->
c_authmech
)
);
assert
(
BER_BVISNULL
(
&
c
->
c_dn
)
);
assert
(
BER_BVISNULL
(
&
c
->
c_ndn
)
);
...
...
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