first cut at adding full transactions for ctdb to samba3
[bbaumbach/samba-autobuild/.git] / source3 / smbd / server.c
index ed07e5c02b07a7935baba13102c9e62e22cb3edb..05f11f6753c7ab7f43d736af7fc3f5232f94aac7 100644 (file)
@@ -90,8 +90,11 @@ struct messaging_context *smbd_messaging_context(void)
 {
        static struct messaging_context *ctx;
 
-       if (!ctx && !(ctx = messaging_init(NULL, server_id_self(),
-                                          smbd_event_context()))) {
+       if (ctx == NULL) {
+               ctx = messaging_init(NULL, server_id_self(),
+                                    smbd_event_context());
+       }
+       if (ctx == NULL) {
                DEBUG(0, ("Could not init smbd messaging context.\n"));
        }
        return ctx;
@@ -1094,8 +1097,6 @@ extern void build_options(bool screen);
 
        TimeInit();
 
-       db_tdb2_setup_messaging(NULL, false);
-
 #ifdef HAVE_SET_AUTH_PARAMETERS
        set_auth_parameters(argc,argv);
 #endif
@@ -1227,11 +1228,6 @@ extern void build_options(bool screen);
        if (smbd_messaging_context() == NULL)
                exit(1);
 
-       /*
-        * Do this before reload_services.
-        */
-       db_tdb2_setup_messaging(smbd_messaging_context(), true);
-
        if (!reload_services(False))
                return(-1);