summaryrefslogtreecommitdiffstats
path: root/ctdb/common
diff options
context:
space:
mode:
authorAlexander Bokovoy <ab@samba.org>2006-11-29 17:47:42 +0300
committerAlexander Bokovoy <ab@samba.org>2006-11-29 17:47:42 +0300
commitad4443e5e23ba85ec59b5b14dca1c2474f9caebc (patch)
treeb42fe40b586c32e5b88bca28df9e637acbf77b85 /ctdb/common
parentb17a9b8f97356a4bc1763ae4c8d179eb7d772ef8 (diff)
downloadsamba-ad4443e5e23ba85ec59b5b14dca1c2474f9caebc.tar.gz
samba-ad4443e5e23ba85ec59b5b14dca1c2474f9caebc.tar.xz
samba-ad4443e5e23ba85ec59b5b14dca1c2474f9caebc.zip
Fix ctdb_call() fetching data and ltdb backend flags
(This used to be ctdb commit 5ecee128edcd56d7715567cc1d1403453826c664)
Diffstat (limited to 'ctdb/common')
-rw-r--r--ctdb/common/ctdb_call.c3
-rw-r--r--ctdb/common/ctdb_ltdb.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/ctdb/common/ctdb_call.c b/ctdb/common/ctdb_call.c
index f16c5705f4..d0e9790ec8 100644
--- a/ctdb/common/ctdb_call.c
+++ b/ctdb/common/ctdb_call.c
@@ -43,6 +43,7 @@ static int ctdb_call_local(struct ctdb_context *ctdb, TDB_DATA key, int call_id,
c->key = key;
c->call_data = call_data;
c->record_data.dptr = talloc_memdup(c, data.dptr, data.dsize);
+ c->record_data.dsize = data.dsize;
CTDB_NO_MEMORY(ctdb, c->record_data.dptr);
if (data.dptr) free(data.dptr);
c->new_data = NULL;
@@ -81,7 +82,7 @@ static int ctdb_call_local(struct ctdb_context *ctdb, TDB_DATA key, int call_id,
talloc_free(c);
- return -1;
+ return 0;
}
/*
diff --git a/ctdb/common/ctdb_ltdb.c b/ctdb/common/ctdb_ltdb.c
index 7238a436b4..4fe316f4db 100644
--- a/ctdb/common/ctdb_ltdb.c
+++ b/ctdb/common/ctdb_ltdb.c
@@ -33,7 +33,7 @@ int ctdb_attach(struct ctdb_context *ctdb, const char *name, int tdb_flags,
/* when we have a separate daemon this will need to be a real
file, not a TDB_INTERNAL, so the parent can access it to
for ltdb bypass */
- ctdb->ltdb = tdb_open(name, 0, TDB_INTERNAL, 0, 0);
+ ctdb->ltdb = tdb_open(name, 0, /* tdb_flags */ TDB_INTERNAL, open_flags, mode);
if (ctdb->ltdb == NULL) {
ctdb_set_error(ctdb, "Failed to open tdb %s\n", name);
return -1;