summaryrefslogtreecommitdiffstats
path: root/source/smbd/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/smbd/process.c')
-rw-r--r--source/smbd/process.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/source/smbd/process.c b/source/smbd/process.c
index ea3eb4ba76f..99710b4dfd0 100644
--- a/source/smbd/process.c
+++ b/source/smbd/process.c
@@ -812,7 +812,9 @@ static int construct_reply(char *inbuf,char *outbuf,int size,int bufsize)
/****************************************************************************
Keep track of the number of running smbd's. This functionality is used to
'hard' limit Samba overhead on resource constrained systems.
+ This function is only called once per smbd.
****************************************************************************/
+
static BOOL smbd_process_limit(void)
{
int32 total_smbds;
@@ -823,17 +825,13 @@ static BOOL smbd_process_limit(void)
* subtracts one.
*/
- total_smbds = 1; /* In case we need to create the entry. */
-
if (!conn_tdb_ctx()) {
DEBUG(0,("smbd_process_limit: max smbd processes parameter set with status parameter not \
set. Ignoring max smbd restriction.\n"));
return False;
}
- if (tdb_change_int32_atomic(conn_tdb_ctx(), "INFO/total_smbds", &total_smbds, 1) == -1)
- return True;
-
+ total_smbds = increment_smbd_process_count();
return total_smbds > lp_max_smbd_processes();
}
else