summaryrefslogtreecommitdiff
path: root/source3/param
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-03-18 10:57:46 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:18:41 -0500
commit7c2bc9c07083e7035028cf22e97e0c31b3e9d6a5 (patch)
treee8cc8d5acd02bad82977aee022f65fa75c39a0fa /source3/param
parent8d0cfddb26a354606844a10254055fb8cd54e792 (diff)
downloadsamba-7c2bc9c07083e7035028cf22e97e0c31b3e9d6a5.tar.gz
samba-7c2bc9c07083e7035028cf22e97e0c31b3e9d6a5.tar.bz2
samba-7c2bc9c07083e7035028cf22e97e0c31b3e9d6a5.zip
r21869: Move sending keepalives out of the main processing loop into idle event.
On the way, make lp_keepalive() a proper parameter. Volker (This used to be commit 9499fd9c803d030ce9827f8379c2e56d91bb786e)
Diffstat (limited to 'source3/param')
-rw-r--r--source3/param/loadparm.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 13455101d8..6d2ba9377d 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -79,7 +79,6 @@ extern userdom_struct current_user_info;
#define USERSHARE_VALID 1
#define USERSHARE_PENDING_DELETE 2
-int keepalive = DEFAULT_KEEPALIVE;
BOOL use_getwd_cache = True;
extern int extra_time_offset;
@@ -315,6 +314,7 @@ typedef struct {
int iIdmapNegativeTime;
BOOL bResetOnZeroVC;
+ int iKeepalive;
param_opt_struct *param_opt;
} global;
@@ -1008,7 +1008,7 @@ static struct parm_struct parm_table[] = {
{"block size", P_INTEGER, P_LOCAL, &sDefault.iBlock_size, NULL, NULL, FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL},
{"deadtime", P_INTEGER, P_GLOBAL, &Globals.deadtime, NULL, NULL, FLAG_ADVANCED},
{"getwd cache", P_BOOL, P_GLOBAL, &use_getwd_cache, NULL, NULL, FLAG_ADVANCED},
- {"keepalive", P_INTEGER, P_GLOBAL, &keepalive, NULL, NULL, FLAG_ADVANCED},
+ {"keepalive", P_INTEGER, P_GLOBAL, &Globals.iKeepalive, NULL, NULL, FLAG_ADVANCED},
{"change notify", P_BOOL, P_LOCAL, &sDefault.bChangeNotify, NULL, NULL, FLAG_ADVANCED | FLAG_SHARE },
{"kernel change notify", P_BOOL, P_LOCAL, &sDefault.bKernelChangeNotify, NULL, NULL, FLAG_ADVANCED | FLAG_SHARE },
@@ -1666,6 +1666,8 @@ static void init_globals(BOOL first_time_only)
/* By default disallow guest access to usershares. */
Globals.bUsershareAllowGuests = False;
+ Globals.iKeepalive = DEFAULT_KEEPALIVE;
+
/* By default no shares out of the registry */
Globals.bRegistryShares = False;
}
@@ -1903,6 +1905,7 @@ FN_GLOBAL_LIST(lp_idmap_backend, &Globals.szIdmapBackend) /* deprecated */
FN_GLOBAL_STRING(lp_idmap_alloc_backend, &Globals.szIdmapAllocBackend)
FN_GLOBAL_INTEGER(lp_idmap_expire_time, &Globals.iIdmapExpireTime)
FN_GLOBAL_INTEGER(lp_idmap_negative_time, &Globals.iIdmapNegativeTime)
+FN_GLOBAL_INTEGER(lp_keepalive, &Globals.iKeepalive)
FN_GLOBAL_BOOL(lp_passdb_expand_explicit, &Globals.bPassdbExpandExplicit)
FN_GLOBAL_STRING(lp_ldap_suffix, &Globals.szLdapSuffix)