From cdd802af8319e0b0744d8e727cef75526269ece2 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 3 May 2011 10:40:33 +1000 Subject: s4-messaging Rename messaging -> imessaging This avoid symbol and structure conflicts between Samba3 and Samba4, and chooses a less generic name. Andrew Bartlett --- source4/ntvfs/common/brlock_tdb.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source4/ntvfs/common/brlock_tdb.c') diff --git a/source4/ntvfs/common/brlock_tdb.c b/source4/ntvfs/common/brlock_tdb.c index 35d4c27d0f0..630b4072dbc 100644 --- a/source4/ntvfs/common/brlock_tdb.c +++ b/source4/ntvfs/common/brlock_tdb.c @@ -48,7 +48,7 @@ struct brl_context { struct tdb_wrap *w; struct server_id server; - struct messaging_context *messaging_ctx; + struct imessaging_context *imessaging_ctx; }; /* @@ -89,12 +89,12 @@ static bool brl_invalid_lock_range(uint64_t start, uint64_t size) /* Open up the brlock.tdb database. Close it down using - talloc_free(). We need the messaging_ctx to allow for + talloc_free(). We need the imessaging_ctx to allow for pending lock notifications. */ static struct brl_context *brl_tdb_init(TALLOC_CTX *mem_ctx, struct server_id server, struct loadparm_context *lp_ctx, - struct messaging_context *messaging_ctx) + struct imessaging_context *imessaging_ctx) { struct brl_context *brl; @@ -110,7 +110,7 @@ static struct brl_context *brl_tdb_init(TALLOC_CTX *mem_ctx, struct server_id se } brl->server = server; - brl->messaging_ctx = messaging_ctx; + brl->imessaging_ctx = imessaging_ctx; return brl; } @@ -419,7 +419,7 @@ static void brl_tdb_notify_unlock(struct brl_context *brl, if (locks[i].lock_type == PENDING_WRITE_LOCK) { last_notice = i; } - messaging_send_ptr(brl->messaging_ctx, locks[i].context.server, + imessaging_send_ptr(brl->imessaging_ctx, locks[i].context.server, MSG_BRL_RETRY, locks[i].notify_ptr); } } -- cgit From 14750139639b3531e57a3ca3f9e481d6e458dc06 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 4 May 2011 10:28:15 +1000 Subject: lib/util Move source3 tdb_wrap_open() into the common code. This #if _SAMBA_BUILD == 3 is very unfortunate, as it means that in the top level build, these options are not available for these databases. However, having two different tdb_wrap lists is a worse fate, so this will do for now. Andrew Bartlett --- source4/ntvfs/common/brlock_tdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/ntvfs/common/brlock_tdb.c') diff --git a/source4/ntvfs/common/brlock_tdb.c b/source4/ntvfs/common/brlock_tdb.c index 630b4072dbc..ab4d91c4db6 100644 --- a/source4/ntvfs/common/brlock_tdb.c +++ b/source4/ntvfs/common/brlock_tdb.c @@ -28,7 +28,7 @@ #include "system/filesys.h" #include #include "messaging/messaging.h" -#include "tdb_wrap.h" +#include "lib/util/tdb_wrap.h" #include "lib/messaging/irpc.h" #include "libcli/libcli.h" #include "cluster/cluster.h" -- cgit From 1969aa8eacd257951cdc8d13110302c3b9388013 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 7 May 2011 08:12:54 +0200 Subject: s4-ntvfs: Rename brl_*() -> brlock_*() to avoid conflict with brlock_init in s3 --- source4/ntvfs/common/brlock_tdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/ntvfs/common/brlock_tdb.c') diff --git a/source4/ntvfs/common/brlock_tdb.c b/source4/ntvfs/common/brlock_tdb.c index ab4d91c4db6..3fd0edcc692 100644 --- a/source4/ntvfs/common/brlock_tdb.c +++ b/source4/ntvfs/common/brlock_tdb.c @@ -779,5 +779,5 @@ static const struct brlock_ops brlock_tdb_ops = { void brl_tdb_init_ops(void) { - brl_set_ops(&brlock_tdb_ops); + brlock_set_ops(&brlock_tdb_ops); } -- cgit From 0e4c358e2710580d5aeb439d767c87aaf4c0f2f3 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 20 Jun 2011 18:40:25 +0930 Subject: tdb_compat.h: divert every tdb build and includes to tdb_compat We change all the headers and wscript files to use tdb_compat; this means we have one place to decide whether to use TDB1 or TDB2. Signed-off-by: Rusty Russell --- source4/ntvfs/common/brlock_tdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/ntvfs/common/brlock_tdb.c') diff --git a/source4/ntvfs/common/brlock_tdb.c b/source4/ntvfs/common/brlock_tdb.c index 3fd0edcc692..885eda98cda 100644 --- a/source4/ntvfs/common/brlock_tdb.c +++ b/source4/ntvfs/common/brlock_tdb.c @@ -26,7 +26,7 @@ #include "includes.h" #include "system/filesys.h" -#include +#include "tdb_compat.h" #include "messaging/messaging.h" #include "lib/util/tdb_wrap.h" #include "lib/messaging/irpc.h" -- cgit From 058c4f84924c07b88ccaf3d617f3abff797a7cc8 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 20 Jun 2011 18:40:31 +0930 Subject: tdb_fetch_compat: use instead of tdb_fetch. This is a noop for tdb1. Signed-off-by: Rusty Russell --- source4/ntvfs/common/brlock_tdb.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'source4/ntvfs/common/brlock_tdb.c') diff --git a/source4/ntvfs/common/brlock_tdb.c b/source4/ntvfs/common/brlock_tdb.c index 885eda98cda..817448377cf 100644 --- a/source4/ntvfs/common/brlock_tdb.c +++ b/source4/ntvfs/common/brlock_tdb.c @@ -333,7 +333,7 @@ static NTSTATUS brl_tdb_lock(struct brl_context *brl, } } - dbuf = tdb_fetch(brl->w->tdb, kbuf); + dbuf = tdb_fetch_compat(brl->w->tdb, kbuf); lock.context.smbpid = smbpid; lock.context.server = brl->server; @@ -468,7 +468,7 @@ static NTSTATUS brl_tdb_unlock(struct brl_context *brl, return NT_STATUS_INTERNAL_DB_CORRUPTION; } - dbuf = tdb_fetch(brl->w->tdb, kbuf); + dbuf = tdb_fetch_compat(brl->w->tdb, kbuf); if (!dbuf.dptr) { tdb_chainunlock(brl->w->tdb, kbuf); return NT_STATUS_RANGE_NOT_LOCKED; @@ -568,7 +568,7 @@ static NTSTATUS brl_tdb_remove_pending(struct brl_context *brl, return NT_STATUS_INTERNAL_DB_CORRUPTION; } - dbuf = tdb_fetch(brl->w->tdb, kbuf); + dbuf = tdb_fetch_compat(brl->w->tdb, kbuf); if (!dbuf.dptr) { tdb_chainunlock(brl->w->tdb, kbuf); return NT_STATUS_RANGE_NOT_LOCKED; @@ -639,7 +639,7 @@ static NTSTATUS brl_tdb_locktest(struct brl_context *brl, return NT_STATUS_INVALID_LOCK_RANGE; } - dbuf = tdb_fetch(brl->w->tdb, kbuf); + dbuf = tdb_fetch_compat(brl->w->tdb, kbuf); if (dbuf.dptr == NULL) { return NT_STATUS_OK; } @@ -686,7 +686,7 @@ static NTSTATUS brl_tdb_close(struct brl_context *brl, return NT_STATUS_INTERNAL_DB_CORRUPTION; } - dbuf = tdb_fetch(brl->w->tdb, kbuf); + dbuf = tdb_fetch_compat(brl->w->tdb, kbuf); if (!dbuf.dptr) { tdb_chainunlock(brl->w->tdb, kbuf); return NT_STATUS_OK; @@ -751,7 +751,7 @@ static NTSTATUS brl_tdb_count(struct brl_context *brl, struct brl_handle *brlh, return NT_STATUS_INTERNAL_DB_CORRUPTION; } - dbuf = tdb_fetch(brl->w->tdb, kbuf); + dbuf = tdb_fetch_compat(brl->w->tdb, kbuf); if (!dbuf.dptr) { tdb_chainunlock(brl->w->tdb, kbuf); return NT_STATUS_OK; -- cgit