diff options
author | Michael Adam <obnox@samba.org> | 2009-07-15 14:00:42 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2009-07-15 14:00:43 +0200 |
commit | 5b594c695884aebdfbb199549901fea954122929 (patch) | |
tree | 0a6c7bf31c34cdc00c0771ef4f1a4dcf65674545 /source3/include | |
parent | f49129e59225f6ea84add8e845ffaeb03dc6c8da (diff) | |
download | samba-5b594c695884aebdfbb199549901fea954122929.tar.gz samba-5b594c695884aebdfbb199549901fea954122929.tar.bz2 samba-5b594c695884aebdfbb199549901fea954122929.zip |
s3:dbwrap: add a wrapper dbwrap_trans_do()
This function wraps the action() callback into a db
transaction and the transaction is either committed
or cancelled, depending on the return value of
the action function.
Michael
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/proto.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h index df7815587c..74cedcec18 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -454,6 +454,9 @@ NTSTATUS dbwrap_trans_store_uint32(struct db_context *db, const char *keystr, NTSTATUS dbwrap_trans_store_bystring(struct db_context *db, const char *key, TDB_DATA data, int flags); NTSTATUS dbwrap_trans_delete_bystring(struct db_context *db, const char *key); +NTSTATUS dbwrap_trans_do(struct db_context *db, + NTSTATUS (*action)(struct db_context *, void *), + void *private_data); /* The following definitions come from lib/debug.c */ |