diff options
author | Jeremy Allison <jra@samba.org> | 2002-10-04 22:53:18 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2002-10-04 22:53:18 +0000 |
commit | 3665777a5bc7ffa92f64ba17daf4cc66c3607198 (patch) | |
tree | 125ab749ead948e0a453bbfb4901afb716150eb7 /source3/param | |
parent | cc169cc66824b5a4e33fca8fbd6bd733b7282639 (diff) | |
download | samba-3665777a5bc7ffa92f64ba17daf4cc66c3607198.tar.gz samba-3665777a5bc7ffa92f64ba17daf4cc66c3607198.tar.bz2 samba-3665777a5bc7ffa92f64ba17daf4cc66c3607198.zip |
Add a timeout to tdb_lock_bystring(). Ensure we never have more than
MAX_PRINT_JOBS in a queue.
Jeremy.
(This used to be commit 9fe3c0b90d4bff2217e3cb5a34b4683ca314c06e)
Diffstat (limited to 'source3/param')
-rw-r--r-- | source3/param/loadparm.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 18cba172c0..ba0866883f 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -1798,7 +1798,6 @@ FN_LOCAL_INTEGER(lp_force_dir_security_mode, iDir_Security_force_mode) FN_LOCAL_INTEGER(lp_max_connections, iMaxConnections) FN_LOCAL_INTEGER(lp_defaultcase, iDefaultCase) FN_LOCAL_INTEGER(lp_minprintspace, iMinPrintSpace) -FN_LOCAL_INTEGER(lp_maxprintjobs, iMaxPrintJobs) FN_LOCAL_INTEGER(lp_printing, iPrinting) FN_LOCAL_INTEGER(lp_oplock_contention_limit, iOplockContentionLimit) FN_LOCAL_INTEGER(lp_csc_policy, iCSCPolicy) @@ -4070,3 +4069,16 @@ const char *get_called_name(void) return local_machine; } + +/******************************************************************* + Return the max print jobs per queue. +********************************************************************/ + +int lp_maxprintjobs(int snum) +{ + int maxjobs = LP_SNUM_OK(snum) ? ServicePtrs[snum]->iMaxPrintJobs : sDefault.iMaxPrintJobs; + if (maxjobs <= 0 || maxjobs >= PRINT_MAX_JOBID) + maxjobs = PRINT_MAX_JOBID - 1; + + return maxjobs; +} |