]> arthur.barton.de Git - netatalk.git/blobdiff - etc/afpd/afp_options.c
Trunk-BP: indentions.
[netatalk.git] / etc / afpd / afp_options.c
index 5da26aae8bd8f95d253e1a3af93deb73b9607e24..6f19df50d78f8030c78ee5c0002905a4380f3f60 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $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.3 2002-02-07 23:54:27 srittau Exp $
  *
  * Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
@@ -141,6 +141,7 @@ void afp_options_init(struct afp_options *options)
     options->transports = AFPTRANS_ALL;
     options->passwdfile = _PATH_AFPDPWFILE;
     options->tickleval = 30;
+    options->timeout = 4;
     options->authprintdir = NULL;
     options->umask = 0;
 #ifdef ADMIN_GRP
@@ -223,8 +224,18 @@ int afp_options_parseline(char *buf, struct afp_options *options)
         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);