Moved smbd process counting functions from smbd/server.c to smbd/process.c
authorHerb Lewis <herb@samba.org>
Thu, 9 Jan 2003 06:26:04 +0000 (06:26 +0000)
committerHerb Lewis <herb@samba.org>
Thu, 9 Jan 2003 06:26:04 +0000 (06:26 +0000)
so that bin/vfstest can link.  merge from head

source/smbd/process.c
source/smbd/server.c

index 03b1e007ba634cf82b078f544192a3a67af3637b..06cedea5735f42255dcfe291046daf7bb2e00143 100644 (file)
@@ -799,6 +799,32 @@ static int construct_reply(char *inbuf,char *outbuf,int size,int bufsize)
  'hard' limit Samba overhead on resource constrained systems. 
 ****************************************************************************/
 
+static BOOL process_count_update_successful = False;
+
+static int32 increment_smbd_process_count(void)
+{
+       int32 total_smbds;
+
+       if (lp_max_smbd_processes()) {
+               total_smbds = 0;
+               if (tdb_change_int32_atomic(conn_tdb_ctx(), "INFO/total_smbds", &total_smbds, -1) == -1)
+                       return 1;
+               process_count_update_successful = True;
+               return total_smbds + 1;
+       }
+       return 1;
+}
+
+void decrement_smbd_process_count(void)
+{
+       int32 total_smbds;
+
+       if (lp_max_smbd_processes() && process_count_update_successful) {
+               total_smbds = 1;
+               tdb_change_int32_atomic(conn_tdb_ctx(), "INFO/total_smbds", &total_smbds, -1);
+       }
+}
+
 static BOOL smbd_process_limit(void)
 {
        int32  total_smbds;
index 6ed2cdac96f5bb0b6b4f43933316d553c5175187..0b2fa2a1bab96d19ac8e0cbc6b9698a0d32c7b26 100644 (file)
@@ -522,36 +522,6 @@ static BOOL dump_core(void)
 }
 #endif
 
-/****************************************************************************
-update the current smbd process count
-****************************************************************************/
-
-static BOOL process_count_update_successful = False;
-
-int32 increment_smbd_process_count(void)
-{
-       int32 total_smbds;
-
-       if (lp_max_smbd_processes()) {
-               total_smbds = 0;
-               if (tdb_change_int32_atomic(conn_tdb_ctx(), "INFO/total_smbds", &total_smbds, -1) == -1)
-                       return 1;
-               process_count_update_successful = True;
-               return total_smbds + 1;
-       }
-       return 1;
-}
-
-static void decrement_smbd_process_count(void)
-{
-       int32 total_smbds;
-
-       if (lp_max_smbd_processes() && process_count_update_successful) {
-               total_smbds = 1;
-               tdb_change_int32_atomic(conn_tdb_ctx(), "INFO/total_smbds", &total_smbds, -1);
-       }
-}
-
 /****************************************************************************
  Exit the server.
 ****************************************************************************/