/*
* re-init after a fork
*/
-NTSTATUS messaging_reinit(struct messaging_context *msg_ctx);
+NTSTATUS messaging_reinit(struct messaging_context *msg_ctx,
+ struct server_id id);
NTSTATUS messaging_register(struct messaging_context *msg_ctx,
void *private_data,
/*
* re-init after a fork
*/
-NTSTATUS messaging_reinit(struct messaging_context *msg_ctx)
+NTSTATUS messaging_reinit(struct messaging_context *msg_ctx,
+ struct server_id id)
{
NTSTATUS status;
TALLOC_FREE(msg_ctx->local);
+ msg_ctx->id = id;
+
status = messaging_tdb_init(msg_ctx, msg_ctx, &msg_ctx->local);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0, ("messaging_tdb_init failed: %s\n",
}
NTSTATUS reinit_after_fork(struct messaging_context *msg_ctx,
- struct event_context *ev_ctx,
- bool parent_longlived)
+ struct event_context *ev_ctx,
+ bool parent_longlived)
{
NTSTATUS status = NT_STATUS_OK;
* For clustering, we need to re-init our ctdbd connection after the
* fork
*/
- status = messaging_reinit(msg_ctx);
+ status = messaging_reinit(msg_ctx, procid_self());
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0,("messaging_reinit() failed: %s\n",
nt_errstr(status)));