diff options
author | Jeremy Allison <jra@samba.org> | 2003-03-20 00:51:41 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2003-03-20 00:51:41 +0000 |
commit | c8eed69be0850e7c68318562c91f73855a09dd92 (patch) | |
tree | 900e9791c3c38d9378c77236f802c96f8c791f8b /source3/printing | |
parent | 2f13a74671c62a2861979ce2ab33ad1363bdbcf7 (diff) | |
download | samba-c8eed69be0850e7c68318562c91f73855a09dd92.tar.gz samba-c8eed69be0850e7c68318562c91f73855a09dd92.tar.bz2 samba-c8eed69be0850e7c68318562c91f73855a09dd92.zip |
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 dee1326a1d8a0bf8977df22a0fe014dd5d8dc769)
Diffstat (limited to 'source3/printing')
-rw-r--r-- | source3/printing/printing.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/printing/printing.c b/source3/printing/printing.c index 26ea52e35a..99578975ca 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; } |