X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Ftdb2%2Ftest%2Frun-55-transaction.c;h=d7fd951e57046aa5a17fdbc466bebe70c49d0865;hb=74b0109ebd2a30d57d19ae9a56f16c0f3b3637eb;hp=4ebf792a8c9d7858c81ed55ec21f999a1d2402ac;hpb=b21004624683be5bf1d8f75e3b5be4e9618049ee;p=ccan diff --git a/ccan/tdb2/test/run-55-transaction.c b/ccan/tdb2/test/run-55-transaction.c index 4ebf792a..d7fd951e 100644 --- a/ccan/tdb2/test/run-55-transaction.c +++ b/ccan/tdb2/test/run-55-transaction.c @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -42,7 +43,8 @@ int main(int argc, char *argv[]) /* Cancelling a transaction means no store */ tdb_transaction_cancel(tdb); - ok1(tdb->allrecord_lock.count == 0 && tdb->num_lockrecs == 0); + ok1(tdb->file->allrecord_lock.count == 0 + && tdb->file->num_lockrecs == 0); ok1(tdb_check(tdb, NULL, NULL) == 0); ok1(tdb_fetch(tdb, key, &data) == TDB_ERR_NOEXIST); @@ -56,7 +58,8 @@ int main(int argc, char *argv[]) ok1(memcmp(data.dptr, buffer, data.dsize) == 0); free(data.dptr); ok1(tdb_transaction_commit(tdb) == 0); - ok1(tdb->allrecord_lock.count == 0 && tdb->num_lockrecs == 0); + ok1(tdb->file->allrecord_lock.count == 0 + && tdb->file->num_lockrecs == 0); ok1(tdb_check(tdb, NULL, NULL) == 0); ok1(tdb_fetch(tdb, key, &data) == TDB_SUCCESS); ok1(data.dsize == 1000);