From a63844e10e3e498c1c1e8457d50eb6ab1e6510cf Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 31 Oct 2002 23:41:00 +0000 Subject: Fix slowdown because of enumerating all print queues on every smbd startup. Jeremy. (This used to be commit 6efd17ef78ebcfed1130312fa019d674e4663a00) --- source3/smbd/server.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'source3/smbd') 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); -- cgit