diff options
-rw-r--r-- | source3/smbd/connection.c | 2 | ||||
-rw-r--r-- | source3/smbd/server.c | 5 |
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 |