]> arthur.barton.de Git - netatalk.git/blobdiff - etc/afpd/afp_options.c
Show msg dir in afpd -V
[netatalk.git] / etc / afpd / afp_options.c
index 0a1c9e4d6a8516c49ea65ee8d299fe0da2ad50b9..3c57fd22fbbcc05ea3a7be1016717eaba0f72f73 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: afp_options.c,v 1.48 2009-11-05 14:38:07 franklahm Exp $
+ * $Id: afp_options.c,v 1.52 2010-02-03 11:35:58 franklahm 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;
@@ -365,6 +369,7 @@ int afp_options_parseline(char *buf, struct afp_options *options)
         options->uamlist = opt;
 
     if ((c = getoption(buf, "-ipaddr"))) {
+#if 0
         struct in_addr inaddr;
         if (inet_aton(c, &inaddr) && (opt = strdup(c))) {
             if (!gethostbyaddr((const char *) &inaddr, sizeof(inaddr), AF_INET))
@@ -374,6 +379,8 @@ int afp_options_parseline(char *buf, struct afp_options *options)
         else {
             LOG(log_error, logtype_afpd, "Error parsing -ipaddr, is %s in numbers-and-dots notation?", c);
         }
+#endif
+        options->ipaddr = strdup(c);
     }
 
     /* FIXME CNID Cnid_srv is a server attribute */
@@ -460,7 +467,7 @@ static void show_version( void )
 
        puts( "afpd has been compiled with support for these features:\n" );
 
-       printf( "        AFP3.1 support:\t" );
+       printf( "        AFP3.x support:\t" );
 #ifdef AFP3x
        puts( "Yes" );
 #else
@@ -577,6 +584,7 @@ static void show_paths( void )
        printf( "   AppleVolumes.system:\t%s\n", _PATH_AFPDSYSVOL );
        printf( "  AppleVolumes.default:\t%s\n", _PATH_AFPDDEFVOL );
        printf( "       UAM search path:\t%s\n", _PATH_AFPDUAMPATH );
+    printf( "  Server messages path:\t%s\n", SERVERTEXT);
 }
 
 /*