summaryrefslogtreecommitdiffstats
path: root/source3/printing/tests/vlp.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/printing/tests/vlp.c')
-rw-r--r--source3/printing/tests/vlp.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source3/printing/tests/vlp.c b/source3/printing/tests/vlp.c
index 4bff290e28a..66860e5ada3 100644
--- a/source3/printing/tests/vlp.c
+++ b/source3/printing/tests/vlp.c
@@ -23,6 +23,7 @@
#include "system/passwd.h"
#include "system/filesys.h"
#include "printing.h"
+#include "util_tdb.h"
#ifdef malloc
#undef malloc
@@ -110,10 +111,9 @@ static int next_jobnum(char *printer)
static void set_printer_status(char *printer, int status)
{
fstring keystr;
- int result;
slprintf(keystr, sizeof(keystr) - 1, "STATUS/%s", printer);
- result = tdb_store_int32(tdb, keystr, status);
+ tdb_store_int32(tdb, keystr, status);
}
static int get_printer_status(char *printer)
@@ -392,8 +392,9 @@ int main(int argc, char **argv)
return 1;
}
- if (!(tdb = tdb_open(printdb_path, 0, 0, O_RDWR | O_CREAT,
- 0666))) {
+ /* FIXME: We should *never* open a tdb without logging! */
+ if (!(tdb = tdb_open_compat(printdb_path, 0, 0, O_RDWR | O_CREAT,
+ 0666, NULL, NULL))) {
printf("%s: unable to open %s\n", argv[0], printdb_path);
return 1;
}