]> arthur.barton.de Git - netatalk.git/blobdiff - etc/afpd/afp_options.c
Fix fce merge conflict
[netatalk.git] / etc / afpd / afp_options.c
index 0f6711853076524e9aaa21c4eb53bf764616f2dc..9bb48042fa1e98ffdb5033edf70173995c310740 100644 (file)
@@ -39,6 +39,7 @@
 #include "status.h"
 #include "auth.h"
 #include "dircache.h"
+#include "fce_api.h"
 
 #ifndef MIN
 #define MIN(a, b)  ((a) < (b) ? (a) : (b))
@@ -186,8 +187,9 @@ void afp_options_init(struct afp_options *options)
     options->dircachesize = DEFAULT_MAX_DIRCACHE_SIZE;
     options->flags |= OPTION_ACL2MACCESS;
     options->flags |= OPTION_UUID;
-    options->tcp_sndbuf = 65535;
-    options->tcp_rcvbuf = 65535;
+    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;
 }
 
 /* parse an afpd.conf line. i'm doing it this way because it's
@@ -323,6 +325,12 @@ int afp_options_parseline(char *buf, struct afp_options *options)
         }
     }
 
+    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);
 
@@ -471,6 +479,15 @@ int afp_options_parseline(char *buf, struct afp_options *options)
     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_ote, logtype_afpd, "Fce coalesce: %s", c);
+               fce_set_coalesce(c);
+       }
+
     return 1;
 }