]> arthur.barton.de Git - netatalk.git/blobdiff - etc/afpd/afp_options.c
First working IPC reconnect
[netatalk.git] / etc / afpd / afp_options.c
index f3724c13cdbd6d05f8403b6a753839e9c1f207c0..5cb205dbe7199eb2d6966533490d4538af8ee75e 100644 (file)
@@ -34,8 +34,8 @@
 #include <atalk/paths.h>
 #include <atalk/util.h>
 #include <atalk/compat.h>
+#include <atalk/globals.h>
 
-#include "globals.h"
 #include "status.h"
 #include "auth.h"
 #include "dircache.h"
@@ -350,8 +350,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");
         }
     }