summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2008-04-15 10:50:27 +0200
committerStefan Metzmacher <metze@samba.org>2008-04-18 15:00:19 +0200
commit384282c35f7af5a52125cb02809a0c05d45b1138 (patch)
tree76bb728a2d65ce93c19bb30b9c5141c80d2ed9e7 /source3
parentc5d1a3c710472711baeb8d1b74951f3006f48aaa (diff)
downloadsamba-384282c35f7af5a52125cb02809a0c05d45b1138.tar.gz
samba-384282c35f7af5a52125cb02809a0c05d45b1138.tar.bz2
samba-384282c35f7af5a52125cb02809a0c05d45b1138.zip
nmbd: create the messaging conntext earlier
metze (This used to be commit 056ff094ad2c59992cfdb8b29696c08dab4113d7)
Diffstat (limited to 'source3')
-rw-r--r--source3/nmbd/nmbd.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c
index e765fcb725..9396219ea7 100644
--- a/source3/nmbd/nmbd.c
+++ b/source3/nmbd/nmbd.c
@@ -762,6 +762,8 @@ static bool open_sockets(bool isdaemon, int port)
};
TALLOC_CTX *frame = talloc_stackframe(); /* Setup tos. */
+ db_tdb2_setup_messaging(NULL, false);
+
load_case_tables();
global_nmb_port = NMB_PORT;
@@ -847,7 +849,16 @@ static bool open_sockets(bool isdaemon, int port)
DEBUG(0,("nmbd version %s started.\n", SAMBA_VERSION_STRING));
DEBUGADD(0,("%s\n", COPYRIGHT_STARTUP_MESSAGE));
- db_tdb2_setup_messaging(NULL, false);
+ if (!lp_load_initial_only(get_dyn_CONFIGFILE())) {
+ DEBUG(0, ("error opening config file\n"));
+ exit(1);
+ }
+
+ if (nmbd_messaging_context() == NULL) {
+ return 1;
+ }
+
+ db_tdb2_setup_messaging(nmbd_messaging_context(), true);
if ( !reload_nmbd_services(False) )
return(-1);
@@ -923,8 +934,6 @@ static bool open_sockets(bool isdaemon, int port)
messaging_register(nmbd_messaging_context(), NULL,
MSG_SEND_PACKET, msg_nmbd_send_packet);
- db_tdb2_setup_messaging(nmbd_messaging_context(), true);
-
TimeInit();
DEBUG( 3, ( "Opening sockets %d\n", global_nmb_port ) );