summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-01-08 21:19:15 +0000
committerJeremy Allison <jra@samba.org>2001-01-08 21:19:15 +0000
commite76fe221b8912b2f94c0ac8ecbf59b940f11979c (patch)
treeb0d65cf76a343ea9fa981feffb6721fa27b51a59 /source3/smbd
parentab60974082e1dea0280eb4c80a48f900c0b55995 (diff)
downloadsamba-e76fe221b8912b2f94c0ac8ecbf59b940f11979c.tar.gz
samba-e76fe221b8912b2f94c0ac8ecbf59b940f11979c.tar.bz2
samba-e76fe221b8912b2f94c0ac8ecbf59b940f11979c.zip
Patch from Richard Bollinger for dead entries being left in connections tdb.
Jeremy. (This used to be commit 48a3afcd4716a456c3072bf41450b361e4379be8)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/connection.c2
-rw-r--r--source3/smbd/server.c5
2 files changed, 6 insertions, 1 deletions
diff --git a/source3/smbd/connection.c b/source3/smbd/connection.c
index d150508cef..b0b4bbab7b 100644
--- a/source3/smbd/connection.c
+++ b/source3/smbd/connection.c
@@ -55,7 +55,7 @@ BOOL yield_connection(connection_struct *conn,char *name,int max_connections)
ZERO_STRUCT(key);
key.pid = sys_getpid();
- if (conn) key.cnum = conn->cnum;
+ key.cnum = conn?conn->cnum:-1;
fstrcpy(key.name, name);
kbuf.dptr = (char *)&key;
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index 07e554c4fb..c895972b0e 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -426,6 +426,11 @@ void exit_server(char *reason)
conn_close_all();
+ /* delete our entry in the connections database. */
+ if (lp_status(-1)) {
+ yield_connection(NULL,"",MAXSTATUS);
+ }
+
respond_to_all_remaining_local_messages();
#ifdef WITH_DFS