]> arthur.barton.de Git - netatalk.git/blobdiff - etc/afpd/afp_options.c
Merge remote-tracking branch 'remotes/origin/branch-netatalk-2-1'
[netatalk.git] / etc / afpd / afp_options.c
index 6fff02fd32c48a970c02745444011df9b5772109..3ad83fe26d19d1b872ef05b7bf78413ed82aa02b 100644 (file)
 #include <atalk/paths.h>
 #include <atalk/util.h>
 #include <atalk/compat.h>
+#include <atalk/fce_api.h>
 
 #include "globals.h"
 #include "status.h"
 #include "auth.h"
 #include "dircache.h"
-#include "fce_api.h"
 
 #ifndef MIN
 #define MIN(a, b)  ((a) < (b) ? (a) : (b))
@@ -140,6 +140,8 @@ void afp_options_free(struct afp_options *opt,
        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 */
@@ -190,6 +192,7 @@ void afp_options_init(struct afp_options *options)
     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
@@ -487,6 +490,13 @@ int afp_options_parseline(char *buf, struct afp_options *options)
                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;
 }