Commit 39cf6c7d authored by Ralph Böhme's avatar Ralph Böhme 💬

s3: smbstatus: use client_messaging_context()

Convert one more client to use the client_messaging_context().

smbstatus actually got the messaging setup right, but now that we have
client_messaging_context() let's use it in more places.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=13465Signed-off-by: Ralph Böhme's avatarRalph Boehme <slow@samba.org>
parent 4f3d08bb
Pipeline #25426325 failed with stage
in 31 minutes and 45 seconds
......@@ -528,7 +528,6 @@ int main(int argc, const char *argv[])
};
TALLOC_CTX *frame = talloc_stackframe();
int ret = 0;
struct tevent_context *ev;
struct messaging_context *msg_ctx = NULL;
char *db_path;
bool ok;
......@@ -607,28 +606,9 @@ int main(int argc, const char *argv[])
d_printf("using configfile = %s\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;
}
/*
* This implicitly initializes the global ctdbd connection,
* usable by the db_open() calls further down.
*/
ev = samba_tevent_context_init(NULL);
if (ev == NULL) {
fprintf(stderr, "samba_tevent_context_init failed\n");
ret = -1;
goto done;
}
msg_ctx = messaging_init(NULL, ev);
msg_ctx = client_messaging_context(get_dyn_CONFIGFILE());
if (msg_ctx == NULL) {
fprintf(stderr, "messaging_init failed\n");
fprintf(stderr, "client_messaging_context failed, not root?\n");
ret = -1;
goto done;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment