* NEW: Added a program called cnid_didname_verify that can be used to
verify the consistency of the CNID database.
+* NEW: New afpd option: -timeout. See afpd.conf for more information.
* UPD: Code cleanups and compatibility fixes to macusers.
* UPD: AppleVolumes.system was cleaned up.
* FIX: Really fix Tru64 compilation (see last entry).
# -loginmesg "Message" Client will display "Message" upon logging in
# (no default, same as -l "Message" on commandline)
# -nodebug Switch off debugging
-# -tickleval <number> Specify the tickle timeout interval (in seconds)
+# -tickleval <number> Specify the tickle timeout interval (in seconds).
+# Note, this defaults to 30 seconds, and really
+# shouldn't be changed. If you want to control
+# the server idle timeout, use the -timeout option.
+# -timeout <number> Specify the number of tickles to send before
+# timing out a connection. The default is 4, therefore
+# a connection will timeout in 2 minutes.
# -icon Use the platform-specific icon.
#
# Some examples:
/*
- * $Id: afp_dsi.c,v 1.9.2.2 2002-01-14 02:53:24 srittau Exp $
+ * $Id: afp_dsi.c,v 1.9.2.3 2002-01-14 02:56:08 srittau Exp $
*
* Copyright (c) 1999 Adrian Sun (asun@zoology.washington.edu)
* Copyright (c) 1990,1993 Regents of The University of Michigan.
static struct {
AFPObj *obj;
- unsigned char tickle, flags;
+ unsigned char flags;
+ int tickle;
} child;
static void alarm_handler()
{
/* if we're in the midst of processing something,
- don't die. we'll allow 3 missed tickles before we die (2 minutes) */
- if ((child.flags & CHILD_RUNNING) || (child.tickle++ < 4)) {
+ don't die. */
+ if ((child.flags & CHILD_RUNNING) || (child.tickle++ < child.obj->options.timeout)) {
dsi_tickle(child.obj->handle);
} else { /* didn't receive a tickle. close connection */
syslog(LOG_ERR, "afp_alarm: child timed out");
/*
- * $Id: afp_options.c,v 1.13.2.1 2001-12-03 05:01:03 jmarcus Exp $
+ * $Id: afp_options.c,v 1.13.2.2 2002-01-14 02:56:08 srittau Exp $
*
* Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
* Copyright (c) 1990,1993 Regents of The University of Michigan.
options->transports = AFPTRANS_ALL;
options->passwdfile = _PATH_AFPDPWFILE;
options->tickleval = 30;
+ options->timeout = 4;
options->authprintdir = NULL;
options->umask = 0;
#ifdef ADMIN_GRP
options->passwdminlen = MIN(1, atoi(c));
if ((c = getoption(buf, "-loginmaxfail")))
options->loginmaxfail = atoi(c);
- if ((c = getoption(buf, "-tickleval")))
+ if ((c = getoption(buf, "-tickleval"))) {
options->tickleval = atoi(c);
+ if (options->tickleval <= 0) {
+ options->tickleval = 30;
+ }
+ }
+ if ((c = getoption(buf, "-timeout"))) {
+ options->timeout = atoi(c);
+ if (options->timeout <= 0) {
+ options->timeout = 4;
+ }
+ }
if ((c = getoption(buf, "-server_quantum")))
options->server_quantum = strtoul(c, NULL, 0);
/*
- * $Id: globals.h,v 1.6.2.1 2001-12-03 05:01:04 jmarcus Exp $
+ * $Id: globals.h,v 1.6.2.2 2002-01-14 02:56:08 srittau Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
/* a couple of these options could get stuck in unions to save
* space. */
struct afp_options {
- int connections, port, transports, tickleval, flags;
+ int connections, port, transports, tickleval, timeout, flags;
unsigned char passwdbits, passwdminlen, loginmaxfail;
u_int32_t server_quantum;
char hostname[MAXHOSTNAMELEN + 1], *server, *ipaddr, *configfile;