summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-07-04 16:18:12 +0200
committerVolker Lendecke <vl@samba.org>2010-07-04 17:29:23 +0200
commit5a3c64668a33fc3fa8f87a78d06fa040eed9f8f8 (patch)
tree82d437c46468a211b501d403c28a976b3659057e /source3/lib
parentb3194be286a6af28044375e893cfa0b095dba6e6 (diff)
downloadsamba-5a3c64668a33fc3fa8f87a78d06fa040eed9f8f8.tar.gz
samba-5a3c64668a33fc3fa8f87a78d06fa040eed9f8f8.tar.bz2
samba-5a3c64668a33fc3fa8f87a78d06fa040eed9f8f8.zip
s3: Re-initialize the server_id in messaging_reinit
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/messages.c5
-rw-r--r--source3/lib/util.c6
2 files changed, 7 insertions, 4 deletions
diff --git a/source3/lib/messages.c b/source3/lib/messages.c
index 2fcdc24179..d53297e502 100644
--- a/source3/lib/messages.c
+++ b/source3/lib/messages.c
@@ -226,12 +226,15 @@ struct messaging_context *messaging_init(TALLOC_CTX *mem_ctx,
/*
* 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",
diff --git a/source3/lib/util.c b/source3/lib/util.c
index d7e765d1af..1467c5445d 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -872,8 +872,8 @@ void smb_msleep(unsigned int t)
}
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;
@@ -899,7 +899,7 @@ NTSTATUS reinit_after_fork(struct messaging_context *msg_ctx,
* 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)));