summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-10-31 23:41:00 +0000
committerJeremy Allison <jra@samba.org>2002-10-31 23:41:00 +0000
commita63844e10e3e498c1c1e8457d50eb6ab1e6510cf (patch)
treece8d2ee5c9f1c289dd282cba80b0a8f8f1a680e9 /source3/smbd
parent63eefb36f15c9c823e0a1a33e2fd99f4bb10a993 (diff)
downloadsamba-a63844e10e3e498c1c1e8457d50eb6ab1e6510cf.tar.gz
samba-a63844e10e3e498c1c1e8457d50eb6ab1e6510cf.tar.bz2
samba-a63844e10e3e498c1c1e8457d50eb6ab1e6510cf.zip
Fix slowdown because of enumerating all print queues on every smbd startup.
Jeremy. (This used to be commit 6efd17ef78ebcfed1130312fa019d674e4663a00)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/server.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index 39d5e3bcd3..ad00794bd7 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -370,7 +370,10 @@ static BOOL open_sockets_smbd(BOOL is_daemon,const char *smb_ports)
reset_globals_after_fork();
/* tdb needs special fork handling */
- tdb_reopen_all();
+ if (tdb_reopen_all() == -1) {
+ DEBUG(0,("tdb_reopen_all failed.\n"));
+ return False;
+ }
return True;
}
@@ -859,6 +862,9 @@ static void usage(char *pname)
register_msg_pool_usage();
register_dmalloc_msgs();
+ if (!print_backend_init())
+ exit(1);
+
/* Setup the main smbd so that we can get messages. */
claim_connection(NULL,"",0,True,FLAG_MSG_GENERAL|FLAG_MSG_SMBD);
@@ -881,9 +887,6 @@ static void usage(char *pname)
if (!locking_init(0))
exit(1);
- if (!print_backend_init())
- exit(1);
-
if (!share_info_db_init())
exit(1);