diff options
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/messages.c | 6 | ||||
-rw-r--r-- | source3/lib/messages_dgm.c | 6 |
2 files changed, 7 insertions, 5 deletions
diff --git a/source3/lib/messages.c b/source3/lib/messages.c index 33fd45eef7..ef87ebb6cb 100644 --- a/source3/lib/messages.c +++ b/source3/lib/messages.c @@ -244,8 +244,8 @@ struct messaging_context *messaging_init(TALLOC_CTX *mem_ctx, ctx->event_ctx = ev; ctx->have_context = &have_context; - ret = messaging_dgm_init(ctx, ctx, ctx->event_ctx, &ctx->local, - messaging_recv_cb, ctx); + ret = messaging_dgm_init(ctx, ctx, ctx->event_ctx, ctx->id, + &ctx->local, messaging_recv_cb, ctx); if (ret != 0) { DEBUG(2, ("messaging_dgm_init failed: %s\n", strerror(ret))); @@ -304,7 +304,7 @@ NTSTATUS messaging_reinit(struct messaging_context *msg_ctx) msg_ctx->id = procid_self(); ret = messaging_dgm_init(msg_ctx, msg_ctx, msg_ctx->event_ctx, - &msg_ctx->local, + msg_ctx->id, &msg_ctx->local, messaging_recv_cb, msg_ctx); if (ret != 0) { DEBUG(0, ("messaging_dgm_init failed: %s\n", strerror(errno))); diff --git a/source3/lib/messages_dgm.c b/source3/lib/messages_dgm.c index 69ea5985ac..d35c78b4e3 100644 --- a/source3/lib/messages_dgm.c +++ b/source3/lib/messages_dgm.c @@ -30,6 +30,7 @@ struct messaging_dgm_context { struct messaging_context *msg_ctx; + struct server_id pid; struct poll_funcs *msg_callbacks; void *tevent_handle; struct unix_msg_ctx *dgm_ctx; @@ -174,6 +175,7 @@ static int messaging_dgm_lockfile_remove(TALLOC_CTX *tmp_ctx, int messaging_dgm_init(struct messaging_context *msg_ctx, TALLOC_CTX *mem_ctx, struct tevent_context *ev, + struct server_id pid, struct messaging_backend **presult, void (*recv_cb)(int msg_type, struct server_id src, @@ -185,7 +187,6 @@ int messaging_dgm_init(struct messaging_context *msg_ctx, { struct messaging_backend *result; struct messaging_dgm_context *ctx; - struct server_id pid = messaging_server_id(msg_ctx); int ret; bool ok; const char *cache_dir; @@ -211,6 +212,7 @@ int messaging_dgm_init(struct messaging_context *msg_ctx, result->private_data = ctx; result->send_fn = messaging_dgm_send; ctx->msg_ctx = msg_ctx; + ctx->pid = pid; ctx->recv_cb = recv_cb; ctx->recv_cb_private_data = recv_cb_private_data; @@ -287,7 +289,7 @@ fail_nomem: static int messaging_dgm_context_destructor(struct messaging_dgm_context *c) { - struct server_id pid = messaging_server_id(c->msg_ctx); + struct server_id pid = c->pid; /* * First delete the socket to avoid races. The lockfile is the |