From 3be18a1fba5b008e55a4497470165de62aa15054 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 20 Mar 2003 00:52:37 +0000 Subject: lib/messages.c: Check return from chainlock before modifying message queue. Apply the job returned limit across all requests for job queues. Jeremy. (This used to be commit bf795b684e608f82db822e0759e7b69afd451b65) --- source3/printing/printing.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source3/printing') diff --git a/source3/printing/printing.c b/source3/printing/printing.c index 26ea52e35a3..99578975ca3 100644 --- a/source3/printing/printing.c +++ b/source3/printing/printing.c @@ -1959,6 +1959,7 @@ int print_queue_status(int snum, TDB_DATA data, key; const char *printername; struct tdb_print_db *pdb; + int max_reported_jobs = lp_max_reported_jobs(snum); /* make sure the database is up to date */ @@ -2033,6 +2034,10 @@ int print_queue_status(int snum, QSORT_CAST(printjob_comp)); *queue = tstruct.queue; + + if (max_reported_jobs && tstruct.qcount > max_reported_jobs) + tstruct.qcount = max_reported_jobs; + return tstruct.qcount; } -- cgit