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
Joe Martin
OpenLDAP
Commits
3b63f718
Commit
3b63f718
authored
Jan 02, 2007
by
Quanah Gibson-Mount
Browse files
Fix connection_get race condition on Windows
parent
d3ceb19b
Changes
1
Hide whitespace changes
Inline
Side-by-side
servers/slapd/connection.c
View file @
3b63f718
...
...
@@ -310,6 +310,15 @@ static Connection* connection_get( ber_socket_t s )
assert
(
c
->
c_struct_state
!=
SLAP_C_UNINITIALIZED
);
ber_sockbuf_ctrl
(
c
->
c_sb
,
LBER_SB_OPT_GET_FD
,
&
sd
);
#ifdef HAVE_WINSOCK
/* Avoid race condition after releasing
* connections_mutex
*/
if
(
sd
!=
s
)
{
ldap_pvt_thread_mutex_unlock
(
&
c
->
c_mutex
);
return
NULL
;
}
#endif
if
(
c
->
c_struct_state
!=
SLAP_C_USED
)
{
/* connection must have been closed due to resched */
...
...
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