From 728da472c2c25afcfc0115e5c6bd78cf6df14ee8 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 1 Mar 2003 00:48:09 +0000 Subject: Ensure added jobs increment total_jobs. Jeremy. (This used to be commit d29c6853dd0c43825b3775020076f34faa5cd329) --- source3/printing/printing.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source3/printing/printing.c b/source3/printing/printing.c index c9612ab3a9..26ea52e35a 100644 --- a/source3/printing/printing.c +++ b/source3/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; -- cgit