diff options
author | Michael Adam <obnox@samba.org> | 2009-07-29 15:14:57 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2009-07-29 16:26:29 +0200 |
commit | ae58ff981df4acadb43f0c89e75b760538673bf4 (patch) | |
tree | 49ff0d8512ba6d1387ee570f22639b81044171d4 /source3/lib | |
parent | fac81b375099e32f8124ae3cba631bb5fe36b1cb (diff) | |
download | samba-ae58ff981df4acadb43f0c89e75b760538673bf4.tar.gz samba-ae58ff981df4acadb43f0c89e75b760538673bf4.tar.bz2 samba-ae58ff981df4acadb43f0c89e75b760538673bf4.zip |
s3:dbwrap: add dbwrap_trans_change_int32_atomic()
A transaction wrapper for dbwrap_change_int32_atomic().
Michael
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/dbwrap_util.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/source3/lib/dbwrap_util.c b/source3/lib/dbwrap_util.c index ca0658579a..1c190167b5 100644 --- a/source3/lib/dbwrap_util.c +++ b/source3/lib/dbwrap_util.c @@ -250,6 +250,23 @@ NTSTATUS dbwrap_change_int32_atomic(struct db_context *db, const char *keystr, return ret; } +NTSTATUS dbwrap_trans_change_int32_atomic(struct db_context *db, + const char *keystr, + int32_t *oldval, + int32_t change_val) +{ + NTSTATUS ret; + struct dbwrap_change_int32_atomic_context state; + + state.keystr = keystr; + state.oldval = oldval; + state.change_val = change_val; + + ret = dbwrap_trans_do(db, dbwrap_change_int32_atomic_action, &state); + + return ret; +} + struct dbwrap_store_context { TDB_DATA *key; TDB_DATA *dbuf; |