]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Fix ctdb_call() fetching data and ltdb backend flags
authorAlexander Bokovoy <ab@samba.org>
Wed, 29 Nov 2006 14:47:42 +0000 (17:47 +0300)
committerAlexander Bokovoy <ab@samba.org>
Wed, 29 Nov 2006 14:47:42 +0000 (17:47 +0300)
(This used to be ctdb commit 5ecee128edcd56d7715567cc1d1403453826c664)

ctdb/common/ctdb_call.c
ctdb/common/ctdb_ltdb.c

index f16c5705f49f25e216ef306325aea144834ecf3b..d0e9790ec8aaf083621f2c3e81ce5e89eb9e8189 100644 (file)
@@ -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;
 }
 
 /*
index 7238a436b4912de525e858189cda0b2e75468f0b..4fe316f4db99fc4da65d0836c82aff74d0302260 100644 (file)
@@ -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;