diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-06-24 16:26:23 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-06-24 16:26:23 +1000 |
commit | 6da26870e0ae5acd6ff49a30ec2f6886b44d095e (patch) | |
tree | 850c71039563c16a5d563c47e7ba2ab645baf198 /source3/printing/tests/vlp.c | |
parent | 6925a799d04c6fa59dd2ddef1f5510f9bb7d17d1 (diff) | |
parent | 2610c05b5b95cc7036b3d6dfb894c6cfbdb68483 (diff) | |
download | samba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.tar.gz samba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.tar.bz2 samba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.zip |
Merge 2610c05b5b95cc7036b3d6dfb894c6cfbdb68483 as Samba-4.0alpha16
Diffstat (limited to 'source3/printing/tests/vlp.c')
-rw-r--r-- | source3/printing/tests/vlp.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source3/printing/tests/vlp.c b/source3/printing/tests/vlp.c index 4bff290e28..66860e5ada 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; } |