-#include "config.h"
+#include <ccan/tdb2/private.h>
#include <unistd.h>
#include "lock-tracking.h"
#include <ccan/tap/tap.h>
#define free free_noleak
#include <ccan/tdb2/tdb.c>
+#include <ccan/tdb2/open.c>
#include <ccan/tdb2/free.c>
#include <ccan/tdb2/lock.c>
#include <ccan/tdb2/io.c>
if (setjmp(jmpbuf) != 0) {
/* We're partway through. Simulate our death. */
- close(tdb->fd);
+ close(tdb->file->fd);
forget_locking();
in_transaction = false;
}
/* Put key for agent to fetch. */
- key.dsize = strlen(KEY_STRING);
- key.dptr = (void *)KEY_STRING;
+ key = tdb_mkdata(KEY_STRING, strlen(KEY_STRING));
if (tdb_store(tdb, key, key, TDB_INSERT) != 0)
return false;