s3:winbind: use transaction in idmap_tdb2_allocate_id_action().
authorMichael Adam <obnox@samba.org>
Wed, 29 Jul 2009 12:39:30 +0000 (14:39 +0200)
committerMichael Adam <obnox@samba.org>
Wed, 29 Jul 2009 14:26:25 +0000 (16:26 +0200)
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

source3/winbindd/idmap_tdb2.c

index 8178fa00806ce33868fb66718d64730beb5c47f9..ef365f3ea880ae84c0623063164703b62d613ce3 100644 (file)
@@ -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));