diff options
author | Stefan Metzmacher <metze@samba.org> | 2008-12-17 08:35:35 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2009-01-19 17:06:02 +0100 |
commit | a83b327f1bec10f18ebe59c2fde7fe74228149f2 (patch) | |
tree | 156176c311068ee4cb05ca993e277a88179f331f /source3/lib | |
parent | aa79f76b0cfcf402bdf955cdf8356d619ace0b68 (diff) | |
download | samba-a83b327f1bec10f18ebe59c2fde7fe74228149f2.tar.gz samba-a83b327f1bec10f18ebe59c2fde7fe74228149f2.tar.bz2 samba-a83b327f1bec10f18ebe59c2fde7fe74228149f2.zip |
s3:dbwrap: add get_flags() hook to db_context
metze
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/dbwrap_ctdb.c | 8 | ||||
-rw-r--r-- | source3/lib/dbwrap_tdb.c | 9 |
2 files changed, 17 insertions, 0 deletions
diff --git a/source3/lib/dbwrap_ctdb.c b/source3/lib/dbwrap_ctdb.c index 38daa61b33..03667ff355 100644 --- a/source3/lib/dbwrap_ctdb.c +++ b/source3/lib/dbwrap_ctdb.c @@ -1158,6 +1158,13 @@ static int db_ctdb_get_seqnum(struct db_context *db) return tdb_get_seqnum(ctx->wtdb->tdb); } +static int db_ctdb_get_flags(struct db_context *db) +{ + struct db_ctdb_ctx *ctx = talloc_get_type_abort(db->private_data, + struct db_ctdb_ctx); + return tdb_get_flags(ctx->wtdb->tdb); +} + struct db_context *db_open_ctdb(TALLOC_CTX *mem_ctx, const char *name, int hash_size, int tdb_flags, @@ -1219,6 +1226,7 @@ struct db_context *db_open_ctdb(TALLOC_CTX *mem_ctx, result->traverse = db_ctdb_traverse; result->traverse_read = db_ctdb_traverse_read; result->get_seqnum = db_ctdb_get_seqnum; + result->get_flags = db_ctdb_get_flags; result->transaction_start = db_ctdb_transaction_start; result->transaction_commit = db_ctdb_transaction_commit; result->transaction_cancel = db_ctdb_transaction_cancel; diff --git a/source3/lib/dbwrap_tdb.c b/source3/lib/dbwrap_tdb.c index 4860c61ab0..b5eb1881d4 100644 --- a/source3/lib/dbwrap_tdb.c +++ b/source3/lib/dbwrap_tdb.c @@ -291,6 +291,14 @@ static int db_tdb_get_seqnum(struct db_context *db) return tdb_get_seqnum(db_ctx->wtdb->tdb); } +static int db_tdb_get_flags(struct db_context *db) + +{ + struct db_tdb_ctx *db_ctx = + talloc_get_type_abort(db->private_data, struct db_tdb_ctx); + return tdb_get_flags(db_ctx->wtdb->tdb); +} + static int db_tdb_transaction_start(struct db_context *db) { struct db_tdb_ctx *db_ctx = @@ -344,6 +352,7 @@ struct db_context *db_open_tdb(TALLOC_CTX *mem_ctx, result->traverse = db_tdb_traverse; result->traverse_read = db_tdb_traverse_read; result->get_seqnum = db_tdb_get_seqnum; + result->get_flags = db_tdb_get_flags; result->persistent = ((tdb_flags & TDB_CLEAR_IF_FIRST) == 0); result->transaction_start = db_tdb_transaction_start; result->transaction_commit = db_tdb_transaction_commit; |