summaryrefslogtreecommitdiff
path: root/source3/param
diff options
context:
space:
mode:
authorKarolin Seeger <kseeger@samba.org>2008-09-23 16:54:05 -0700
committerKarolin Seeger <kseeger@samba.org>2008-09-23 16:57:58 -0700
commit765e5d2282959770ea9648e0f2b72e51e5b4cdd8 (patch)
treebf59bcd16948792db4fad6e8fad5be03f13fd286 /source3/param
parent61a45c85dec8e65ba9782c3ec4af0e9a42895eb3 (diff)
downloadsamba-765e5d2282959770ea9648e0f2b72e51e5b4cdd8.tar.gz
printing: Add new parameter "cups timeout".
The default timeout for connections to CUPS servers is set to 5 minutes in the CUPS libraries. The smbd hangs on startup until the timeout is reached if the CUPS server is unreachable. This parameter makes the timeout configurable. The default value is set to 30 seconds. Karolin
Diffstat (limited to 'source3/param')
-rw-r--r--source3/param/loadparm.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 60a1fa48584..db9e990e64f 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -52,6 +52,7 @@
*/
#include "includes.h"
+#include "printing.h"
bool bLoaded = False;
@@ -340,6 +341,7 @@ struct global {
int iKeepalive;
int iminreceivefile;
struct param_opt_struct *param_opt;
+ int cups_timeout;
};
static struct global Globals;
@@ -2595,6 +2597,15 @@ static struct parm_struct parm_table[] = {
.flags = FLAG_ADVANCED | FLAG_PRINT | FLAG_GLOBAL,
},
{
+ .label = "cups timeout",
+ .type = P_INTEGER,
+ .p_class = P_GLOBAL,
+ .ptr = &Globals.cups_timeout,
+ .special = NULL,
+ .enum_list = NULL,
+ .flags = FLAG_ADVANCED,
+ },
+ {
.label = "iprint server",
.type = P_STRING,
.p_class = P_GLOBAL,
@@ -4794,6 +4805,7 @@ static void init_globals(bool first_time_only)
* to never expire, though, when this runs out the afs client will
* forget the token. Set to 0 to get NEVERDATE.*/
Globals.iAfsTokenLifetime = 604800;
+ Globals.cups_timeout = CUPS_DEFAULT_TIMEOUT;
/* these parameters are set to defaults that are more appropriate
for the increasing samba install base:
@@ -5235,6 +5247,7 @@ FN_GLOBAL_LIST(lp_svcctl_list, &Globals.szServicesList)
FN_LOCAL_STRING(lp_cups_options, szCupsOptions)
FN_GLOBAL_STRING(lp_cups_server, &Globals.szCupsServer)
FN_GLOBAL_STRING(lp_iprint_server, &Globals.szIPrintServer)
+FN_GLOBAL_INTEGER(lp_cups_timeout, &Globals.cups_timeout)
FN_GLOBAL_CONST_STRING(lp_ctdbd_socket, &Globals.ctdbdSocket)
FN_GLOBAL_LIST(lp_cluster_addresses, &Globals.szClusterAddresses)
FN_GLOBAL_BOOL(lp_clustering, &Globals.clustering)