summaryrefslogtreecommitdiff
path: root/source3/param
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-10-04 22:53:30 +0000
committerJeremy Allison <jra@samba.org>2002-10-04 22:53:30 +0000
commit9c94d1a2f72b6fcbbd056804837fc8719806491b (patch)
tree71d5b825cc8bebd43bf319b604a003bcddf3cdd7 /source3/param
parentfac6a13fd3cee8f3f4f7f8e3a2dbb700181c67c3 (diff)
downloadsamba-9c94d1a2f72b6fcbbd056804837fc8719806491b.tar.gz
samba-9c94d1a2f72b6fcbbd056804837fc8719806491b.tar.bz2
samba-9c94d1a2f72b6fcbbd056804837fc8719806491b.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 bb58a08af459b4abae9d53ab98c15f40638ce52b)
Diffstat (limited to 'source3/param')
-rw-r--r--source3/param/loadparm.c14
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;
+}