diff options
author | Jeremy Allison <jra@samba.org> | 2003-03-01 00:49:00 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2003-03-01 00:49:00 +0000 |
commit | a75d9fc4e1c26e3ae15a97508f6f1cf69fe54148 (patch) | |
tree | 4934b44fdbb7a4b5f7215932a0a33c43eaa6ce51 | |
parent | e660b0b8d034c6cb9771601c64b952380d136ca1 (diff) | |
download | samba-a75d9fc4e1c26e3ae15a97508f6f1cf69fe54148.tar.gz samba-a75d9fc4e1c26e3ae15a97508f6f1cf69fe54148.tar.xz samba-a75d9fc4e1c26e3ae15a97508f6f1cf69fe54148.zip |
Ensure added jobs increment total_jobs.
Jeremy.
-rw-r--r-- | source/printing/printing.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/printing/printing.c b/source/printing/printing.c index c9612ab3a91..26ea52e35a3 100644 --- a/source/printing/printing.c +++ b/source/printing/printing.c @@ -916,6 +916,9 @@ static void print_queue_update(int snum) SAFE_FREE(tstruct.queue); + DEBUG(10,("print_queue_update: printer %s INFO/total_jobs = %d\n", + printer_name, tstruct.total_jobs )); + tdb_store_int32(pdb->tdb, "INFO/total_jobs", tstruct.total_jobs); get_queue_status(snum, &old_status); @@ -1733,6 +1736,9 @@ to open spool file %s.\n", pjob.filename)); pjob_store(snum, jobid, &pjob); + /* Ensure we keep a rough count of the number of total jobs... */ + tdb_change_int32_atomic(pdb->tdb, "INFO/total_jobs", &njobs, 1); + release_print_db(pdb); return jobid; |