]> arthur.barton.de Git - netatalk.git/commitdiff
disable slp advertising by default, change noslp option to slp
authordidg <didg>
Tue, 24 Nov 2009 21:01:45 +0000 (21:01 +0000)
committerdidg <didg>
Tue, 24 Nov 2009 21:01:45 +0000 (21:01 +0000)
config/afpd.conf.tmpl
etc/afpd/afp_options.c

index 2680b24c94402b712b153a03e89b8aab9a9f21e5..77e6aef65390f0776098bc5be2a848c1e6696728 100644 (file)
@@ -49,7 +49,7 @@
 #                         if you don't want the proxy server to act as
 #                         a ddp server as well, set -uamlist to an
 #                        empty string.
-#     -noslp              Don't register this server with the Service
+#     -slp                Register this server with the Service
 #                        Location Protocol.
 #
 #
index 8cd2c96506b692b8a73b66e1b098d1b23231ba57..2637e1a8cf1c6fa105de3157a5d22a818b78b8d2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: afp_options.c,v 1.50 2009-11-22 11:57:45 franklahm Exp $
+ * $Id: afp_options.c,v 1.51 2009-11-24 21:01:45 didg Exp $
  *
  * Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
@@ -191,6 +191,10 @@ void afp_options_init(struct afp_options *options)
     options->volnamelen = 80; /* spec: 255, 10.1: 73, 10.4/10.5: 80 */
     options->ntdomain = NULL;
     options->ntseparator = NULL;
+#ifdef USE_SRVLOC
+    /* don't advertize slp by default */
+    options->flags |= OPTION_NOSLP;
+#endif
 }
 
 /* parse an afpd.conf line. i'm doing it this way because it's
@@ -213,9 +217,9 @@ int afp_options_parseline(char *buf, struct afp_options *options)
     if (strstr(buf, " -nodebug"))
         options->flags &= ~OPTION_DEBUG;
 #ifdef USE_SRVLOC
-    if (strstr(buf, " -noslp"))
-        options->flags |= OPTION_NOSLP;
-#endif /* USE_SRVLOC */
+    if (strstr(buf, " -slp"))
+        options->flags &= ~OPTION_NOSLP;
+#endif
 
     if (strstr(buf, " -nouservolfirst"))
         options->flags &= ~OPTION_USERVOLFIRST;