tdb2: set tdb_error() on tdb_transaction_prepare_commit.
authorRusty Russell <rusty@rustcorp.com.au>
Fri, 2 Sep 2011 06:03:59 +0000 (15:33 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Fri, 2 Sep 2011 06:03:59 +0000 (15:33 +0930)
ccan/tdb2/transaction.c

index eab00e0937778b51ce79d7b48de26daf94c93c78..64bd5366ebeb03d72d58c4f3121d18e61b1cf2fe 100644 (file)
@@ -1067,7 +1067,7 @@ enum TDB_ERROR tdb_transaction_prepare_commit(struct tdb_context *tdb)
                        return tdb->last_error;
                return TDB_SUCCESS;
        }
-       return _tdb_transaction_prepare_commit(tdb);
+       return tdb->last_error = _tdb_transaction_prepare_commit(tdb);
 }
 
 /*