mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
s3-messaging: use messaging_ctdbd_reinit() in messaging_reinit()
This is the last step to fix a regression introduced by
3fe3226daa
and
3fe3226daa8488e0fa787c40359c3401b6f05fc0^
where we pass the ctdb-messaging object conn to db_open() and add a
reference to it to the private db_ctdb_ctx for later use. Unfortunately
reinit_after_fork() destroys conn, leaving us with an invalid reference.
The previous patches added new lower level functions
messaging_ctdbd_reinit() and ctdbd_reinit_connection(), finally use them
them from messaging_reinit(). They preserve the conn object and simply
reinitialize the IPC fd.
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Mon Jul 11 23:45:20 CEST 2016 on sn-devel-144
This commit is contained in:
parent
f991381356
commit
a391e9202d
@ -416,11 +416,9 @@ NTSTATUS messaging_reinit(struct messaging_context *msg_ctx)
|
||||
return map_nt_error_from_unix(ret);
|
||||
}
|
||||
|
||||
TALLOC_FREE(msg_ctx->remote);
|
||||
|
||||
if (lp_clustering()) {
|
||||
ret = messaging_ctdbd_init(msg_ctx, msg_ctx,
|
||||
&msg_ctx->remote);
|
||||
ret = messaging_ctdbd_reinit(msg_ctx, msg_ctx,
|
||||
msg_ctx->remote);
|
||||
|
||||
if (ret != 0) {
|
||||
DEBUG(1, ("messaging_ctdbd_init failed: %s\n",
|
||||
|
Loading…
Reference in New Issue
Block a user