The branch, v3-2-test has been updated
       via  c4f7bee9238db536a7d5215cebb0bf37f757dfad (commit)
      from  727127f1dcd49b31b5a48cc3f9314aa2380d60e1 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -----------------------------------------------------------------
commit c4f7bee9238db536a7d5215cebb0bf37f757dfad
Author: Volker Lendecke <[EMAIL PROTECTED]>
Date:   Wed Apr 23 11:35:51 2008 +0200

    Correctly initialize lp_load in smbstatus in the presence of registry on 
tdb2

-----------------------------------------------------------------------

Summary of changes:
 source/utils/status.c |   20 ++++++++++++++++----
 1 files changed, 16 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/utils/status.c b/source/utils/status.c
index ffa3fbd..e4592dd 100644
--- a/source/utils/status.c
+++ b/source/utils/status.c
@@ -296,6 +296,7 @@ static int traverse_sessionid(struct db_record *db, void 
*state)
        };
        TALLOC_CTX *frame = talloc_stackframe();
        int ret = 0;
+       struct messaging_context *msg_ctx;
 
        sec_init();
        load_case_tables();
@@ -359,8 +360,9 @@ static int traverse_sessionid(struct db_record *db, void 
*state)
                d_printf("using configfile = %s\n", get_dyn_CONFIGFILE());
        }
 
-       if (!lp_load(get_dyn_CONFIGFILE(),False,False,False,True)) {
-               fprintf(stderr, "Can't load %s - run testparm to debug it\n", 
get_dyn_CONFIGFILE());
+       if (!lp_load_initial_only(get_dyn_CONFIGFILE())) {
+               fprintf(stderr, "Can't load %s - run testparm to debug it\n",
+                       get_dyn_CONFIGFILE());
                ret = -1;
                goto done;
        }
@@ -370,8 +372,18 @@ static int traverse_sessionid(struct db_record *db, void 
*state)
         * the db_open() calls further down.
         */
 
-       messaging_init(NULL, procid_self(), event_context_init(NULL));
-       
+       msg_ctx = messaging_init(NULL, procid_self(),
+                                event_context_init(NULL));
+
+       db_tdb2_setup_messaging(msg_ctx, true);
+
+       if (!lp_load(get_dyn_CONFIGFILE(),False,False,False,True)) {
+               fprintf(stderr, "Can't load %s - run testparm to debug it\n",
+                       get_dyn_CONFIGFILE());
+               ret = -1;
+               goto done;
+       }
+
        switch (profile_only) {
                case 'P':
                        /* Dump profile data */


-- 
Samba Shared Repository

Reply via email to