From ad4443e5e23ba85ec59b5b14dca1c2474f9caebc Mon Sep 17 00:00:00 2001 From: Alexander Bokovoy Date: Wed, 29 Nov 2006 17:47:42 +0300 Subject: [PATCH] Fix ctdb_call() fetching data and ltdb backend flags (This used to be ctdb commit 5ecee128edcd56d7715567cc1d1403453826c664) --- ctdb/common/ctdb_call.c | 3 ++- ctdb/common/ctdb_ltdb.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ctdb/common/ctdb_call.c b/ctdb/common/ctdb_call.c index f16c5705f49..d0e9790ec8a 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 7238a436b49..4fe316f4db9 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; -- 2.47.3