This is the last step to fix a regression introduced by
3fe3226daa8488e0fa787c40359c3401b6f05fc0 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
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",