From: Michael Adam Date: Wed, 29 Jul 2009 12:39:30 +0000 (+0200) Subject: s3:winbind: use transaction in idmap_tdb2_allocate_id_action(). X-Git-Tag: tevent-0.9.8~618 X-Git-Url: http://git.samba.org/samba.git/?p=gd%2Fsamba-autobuild%2F.git;a=commitdiff_plain;h=bd34de10bc4f814c943c5deac0028fc2cc8a1f12 s3:winbind: use transaction in idmap_tdb2_allocate_id_action(). This uses the new dbwrap_trans_change_uint32_atomic() instead of dbwrap_change_uint32_atomic(). Now all db write operations in idmap_tdb2.c are using transactions. Michael --- diff --git a/source3/winbindd/idmap_tdb2.c b/source3/winbindd/idmap_tdb2.c index 8178fa00806..ef365f3ea88 100644 --- a/source3/winbindd/idmap_tdb2.c +++ b/source3/winbindd/idmap_tdb2.c @@ -225,7 +225,7 @@ static NTSTATUS idmap_tdb2_allocate_id_action(struct db_context *db, } /* fetch a new id and increment it */ - ret = dbwrap_change_uint32_atomic(db, state->hwmkey, &hwm, 1); + ret = dbwrap_trans_change_uint32_atomic(db, state->hwmkey, &hwm, 1); if (!NT_STATUS_IS_OK(ret)) { DEBUG(1, ("Fatal error while fetching a new %s value\n!", state->hwmtype));