diff options
author | Jeremy Allison <jra@samba.org> | 2001-02-12 16:18:02 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2001-02-12 16:18:02 +0000 |
commit | 94fc44a93c46cece9b9fa947bff62087dbcd89fa (patch) | |
tree | 292e61a7af5427e683d483a7afd802933ced9b72 /source3/smbd/server.c | |
parent | b4b387e31b241dcf4c8359c8515db689946654d5 (diff) | |
download | samba-94fc44a93c46cece9b9fa947bff62087dbcd89fa.tar.gz samba-94fc44a93c46cece9b9fa947bff62087dbcd89fa.tar.bz2 samba-94fc44a93c46cece9b9fa947bff62087dbcd89fa.zip |
Merge of JohnR's changes to appliance-head, JF's changes to 2.2,
updated the POSIX_ACL code to be in sync.
Jeremy.
(This used to be commit c0517d6f4e3079feca1309fd1ea7b21e83f0de02)
Diffstat (limited to 'source3/smbd/server.c')
-rw-r--r-- | source3/smbd/server.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/source3/smbd/server.c b/source3/smbd/server.c index a13f34d506..8eacd4ed58 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -410,6 +410,22 @@ static BOOL dump_core(void) #endif /**************************************************************************** +update the current smbd process count +****************************************************************************/ +static void decrement_smbd_process_count(void) +{ + int total_smbds; + + if (lp_max_smbd_processes()) { + tdb_lock_bystring(conn_tdb_ctx(), "INFO/total_smbds"); + if ((total_smbds = tdb_fetch_int(conn_tdb_ctx(), "INFO/total_smbds")) > 0) + tdb_store_int(conn_tdb_ctx(), "INFO/total_smbds", total_smbds - 1); + + tdb_unlock_bystring(conn_tdb_ctx(), "INFO/total_smbds"); + } +} + +/**************************************************************************** exit the server ****************************************************************************/ void exit_server(char *reason) @@ -432,6 +448,7 @@ void exit_server(char *reason) } respond_to_all_remaining_local_messages(); + decrement_smbd_process_count(); #ifdef WITH_DFS if (dcelogin_atmost_once) { |