summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-10-31 23:41:02 +0000
committerJeremy Allison <jra@samba.org>2002-10-31 23:41:02 +0000
commit5593892caff697ffcf0db42189fd3836907e8af5 (patch)
tree7c64ee0db181ef84161db76e5342cc2652f8b66e /source3/smbd
parent2d62bd52486bd20922143f61cb7a3159ec78e478 (diff)
downloadsamba-5593892caff697ffcf0db42189fd3836907e8af5.tar.gz
samba-5593892caff697ffcf0db42189fd3836907e8af5.tar.bz2
samba-5593892caff697ffcf0db42189fd3836907e8af5.zip
Fix slowdown because of enumerating all print queues on every smbd startup.
Jeremy. (This used to be commit d05b147fb3f32031a202cf61703dc2fd969f4617)
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);