summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/utils/status.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/source3/utils/status.c b/source3/utils/status.c
index f7a6155be2..6d616149d7 100644
--- a/source3/utils/status.c
+++ b/source3/utils/status.c
@@ -377,18 +377,20 @@ static int traverse_sessionid(struct db_record *db, void *state)
goto done;
}
- /*
- * This implicitly initializes the global ctdbd connection, usable by
- * the db_open() calls further down.
- */
- msg_ctx = messaging_init(NULL, procid_self(),
- event_context_init(NULL));
-
- if (msg_ctx == NULL) {
- fprintf(stderr, "messaging_init failed\n");
- ret = -1;
- goto done;
+ if (lp_clustering()) {
+ /*
+ * This implicitly initializes the global ctdbd
+ * connection, usable by the db_open() calls further
+ * down.
+ */
+ msg_ctx = messaging_init(NULL, procid_self(),
+ event_context_init(NULL));
+ if (msg_ctx == NULL) {
+ fprintf(stderr, "messaging_init failed\n");
+ ret = -1;
+ goto done;
+ }
}
if (!lp_load(get_dyn_CONFIGFILE(),False,False,False,True)) {