Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Lukas However
OpenLDAP
Commits
877faea7
Commit
877faea7
authored
Jun 21, 2019
by
Ondřej Kuzník
Committed by
Quanah Gibson-Mount
Jun 21, 2019
Browse files
ITS#7996 Use a separate mutex in ldap_int_initialize
parent
708916fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
libraries/libldap/init.c
View file @
877faea7
...
...
@@ -589,14 +589,14 @@ char * ldap_int_hostname = NULL;
void
ldap_int_initialize
(
struct
ldapoptions
*
gopts
,
int
*
dbglvl
)
{
#ifdef LDAP_R_COMPILE
LDAP_PVT_MUTEX_FIRSTCREATE
(
gopts
->
ldo
_mutex
)
;
#endif
static
ldap_pvt_thread_mutex_t
init
_mutex
;
LDAP_PVT_MUTEX_FIRSTCREATE
(
init_mutex
);
LDAP_MUTEX_LOCK
(
&
gopts
->
ldo_mutex
);
LDAP_MUTEX_LOCK
(
&
init_mutex
);
#endif
if
(
gopts
->
ldo_valid
==
LDAP_INITIALIZED
)
{
/* someone else got here first */
LDAP_MUTEX_UNLOCK
(
&
gopts
->
ldo_mutex
);
return
;
goto
done
;
}
ldap_int_error_init
();
...
...
@@ -718,6 +718,8 @@ void ldap_int_initialize( struct ldapoptions *gopts, int *dbglvl )
openldap_ldap_init_w_env
(
gopts
,
NULL
);
done:
LDAP_MUTEX_UNLOCK
(
&
gopts
->
ldo_mutex
);
done:
;
#ifdef LDAP_R_COMPILE
LDAP_MUTEX_UNLOCK
(
&
init_mutex
);
#endif
}
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