]> arthur.barton.de Git - netatalk.git/blobdiff - etc/afpd/afp_options.c
Merge sf.net
[netatalk.git] / etc / afpd / afp_options.c
index 3ad83fe26d19d1b872ef05b7bf78413ed82aa02b..b79bc8d1f443329bb220f5dbbf408e60e1e390b2 100644 (file)
@@ -34,9 +34,9 @@
 #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"
@@ -354,8 +354,11 @@ int afp_options_parseline(char *buf, struct afp_options *options)
     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");
         }
     }