#include <atalk/paths.h>
#include <atalk/util.h>
#include <atalk/compat.h>
+#include <atalk/globals.h>
+#include <atalk/fce_api.h>
-#include "globals.h"
#include "status.h"
#include "auth.h"
#include "dircache.h"
free(opt->ntseparator);
if (opt->logconfig && (opt->logconfig != save->logconfig))
free(opt->logconfig);
+ if (opt->mimicmodel && (opt->mimicmodel != save->mimicmodel))
+ free(opt->mimicmodel);
}
/* initialize options */
options->passwdfile = _PATH_AFPDPWFILE;
options->tickleval = 30;
options->timeout = 4; /* 4 tickles = 2 minutes */
- options->sleep = 10* 120; /* 10 h in 30 seconds tick */
- options->disconnected = 20; /* 20 * 30 s (default tickleval) = 10 minutes */
+ options->sleep = 10 * 60 * 2; /* 10 h in 30 seconds tick */
+ options->disconnected = 10 * 60 * 2; /* 10 h in 30 seconds tick */
options->server_notif = 1;
options->authprintdir = NULL;
options->signatureopt = "auto";
options->dircachesize = DEFAULT_MAX_DIRCACHE_SIZE;
options->flags |= OPTION_ACL2MACCESS;
options->flags |= OPTION_UUID;
+ options->tcp_sndbuf = 0; /* 0 means don't change OS default */
+ options->tcp_rcvbuf = 0; /* 0 means don't change OS default */
+ options->dsireadbuf = 12;
+ options->mimicmodel = NULL;
}
/* parse an afpd.conf line. i'm doing it this way because it's
}
}
+ if ((c = getoption(buf, "-dsireadbuf"))) {
+ options->dsireadbuf = atoi(c);
+ if (options->dsireadbuf < 6)
+ options->dsireadbuf = 6;
+ }
+
if ((c = getoption(buf, "-server_quantum")))
options->server_quantum = strtoul(c, NULL, 0);
while (NULL != (c = strstr(c, "-setuplog"))) {
char *optstr;
if ((optstr = getoption(c, "-setuplog"))) {
+ /* hokey2: options->logconfig must be converted to store an array of logstrings */
+ if (options->logconfig)
+ free(options->logconfig);
+ options->logconfig = strdup(optstr);
setuplog(optstr);
- options->logconfig = optstr; /* at least store the last (possibly only) one */
c += sizeof("-setuplog");
}
}
if ((c = getoption(buf, "-dircachesize")))
options->dircachesize = atoi(c);
+ if ((c = getoption(buf, "-tcpsndbuf")))
+ options->tcp_sndbuf = atoi(c);
+
+ if ((c = getoption(buf, "-tcprcvbuf")))
+ options->tcp_rcvbuf = atoi(c);
+
+ if ((c = getoption(buf, "-fcelistener"))) {
+ LOG(log_note, logtype_afpd, "Adding fce listener \"%s\"", c);
+ fce_add_udp_socket(c);
+ }
+ if ((c = getoption(buf, "-fcecoalesce"))) {
+ LOG(log_note, logtype_afpd, "Fce coalesce: %s", c);
+ fce_set_coalesce(c);
+ }
+ if ((c = getoption(buf, "-fceevents"))) {
+ LOG(log_note, logtype_afpd, "Fce events: %s", c);
+ fce_set_events(c);
+ }
+
+ if ((c = getoption(buf, "-mimicmodel")) && (opt = strdup(c)))
+ options->mimicmodel = opt;
+
return 1;
}