s4-ldb: fixed a transaction error on prepare_commit
authorAndrew Tridgell <tridge@samba.org>
Wed, 16 Dec 2009 06:12:28 +0000 (17:12 +1100)
committerAndrew Tridgell <tridge@samba.org>
Wed, 16 Dec 2009 09:56:23 +0000 (20:56 +1100)
when a prepare commit fails, we need to give a cancel to all modules,
not a commit!

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

source4/lib/ldb/common/ldb.c

index a3472a60e57213db43d4f9648c36c8653d8a6479..91429c241504aaca4a071b793df357987778f9d2 100644 (file)
@@ -382,8 +382,8 @@ int ldb_transaction_prepare_commit(struct ldb_context *ldb)
        if (status != LDB_SUCCESS) {
                /* if a module fails the prepare then we need
                   to call the end transaction for everyone */
-               FIRST_OP(ldb, end_transaction);
-               module->ops->end_transaction(module);
+               FIRST_OP(ldb, del_transaction);
+               module->ops->del_transaction(module);
                if (ldb->err_string == NULL) {
                        /* no error string was setup by the backend */
                        ldb_asprintf_errstring(ldb,