Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
HAMANO Tsukasa
OpenLDAP
Commits
b66a6279
Commit
b66a6279
authored
Apr 21, 2020
by
Ondřej Kuzník
Browse files
ITS#9597 Send Notice of Disconnection when shutting down a client connection
parent
96d0eec0
Changes
1
Hide whitespace changes
Inline
Side-by-side
servers/lloadd/connection.c
View file @
b66a6279
...
...
@@ -525,7 +525,22 @@ lload_connection_close( LloadConnection *c, void *arg )
/* We were approached from the connection list */
assert
(
IS_ALIVE
(
c
,
c_refcnt
)
);
/* Need to acquire this first, even if we won't need it */
checked_lock
(
&
c
->
c_io_mutex
);
CONNECTION_LOCK
(
c
);
/* Only if it's a client */
if
(
c
->
c_state
==
LLOAD_C_OPEN
&&
c
->
c_destroy
==
clients_destroy
)
{
if
(
c
->
c_pendingber
!=
NULL
||
(
c
->
c_pendingber
=
ber_alloc
())
!=
NULL
)
{
ber_printf
(
c
->
c_pendingber
,
"t{tit{esss}}"
,
LDAP_TAG_MESSAGE
,
LDAP_TAG_MSGID
,
LDAP_RES_UNSOLICITED
,
LDAP_RES_EXTENDED
,
LDAP_UNAVAILABLE
,
""
,
"connection closing"
,
LDAP_NOTICE_OF_DISCONNECTION
);
}
}
checked_unlock
(
&
c
->
c_io_mutex
);
if
(
!
gentle
||
!
c
->
c_ops
)
{
CONNECTION_DESTROY
(
c
);
return
LDAP_SUCCESS
;
...
...
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