projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c0b259a
)
Don't close 0-filedescriptors on session killing, its our indicator for not here...
author
Wilfried Goesgens
<dothebart@citadel.org>
Tue, 10 May 2011 22:03:20 +0000
(22:03 +0000)
committer
Wilfried Goesgens
<dothebart@citadel.org>
Tue, 10 May 2011 22:13:27 +0000
(22:13 +0000)
citadel/context.c
patch
|
blob
|
history
diff --git
a/citadel/context.c
b/citadel/context.c
index 72516acecb83406382824439619e9ce0bb38eac1..63c2d7cab05f7436d81e8577518ea56420b5e92c 100644
(file)
--- a/
citadel/context.c
+++ b/
citadel/context.c
@@
-357,6
+357,16
@@
void RemoveContext (CitContext *con)
syslog(LOG_NOTICE, "[%3d] Session ended.\n", con->cs_pid);
+ /*
+ * If the client is still connected, blow 'em away.
+ * if the socket is 0, its already gone or was never there.
+ */
+ CtdlLogPrintf(CTDL_DEBUG, "Closing socket %d\n", con->client_socket);
+ if (con->client_socket != 0)
+ {
+ close(con->client_socket);
+ }
+
/* If using AUTHMODE_LDAP, free the DN */
if (con->ldap_dn) {
free(con->ldap_dn);