]> arthur.barton.de Git - netatalk.git/commitdiff
Honor the debug option (we fork before parsing config)
authorJamie Gilbertson <jamie.gilbertson@luniv.ca>
Sun, 11 Mar 2012 06:02:11 +0000 (23:02 -0700)
committerFrank Lahm <franklahm@googlemail.com>
Sun, 11 Mar 2012 16:30:14 +0000 (17:30 +0100)
afpd doesn't actually respect the debug command-line option, because obj.options.flags isn't updated until after afpd has already daemonized itself. Changed to check obj.cmdlineflags instead.

Signed-off-by: Jamie Gilbertson <jamie.gilbertson@luniv.ca>
etc/afpd/main.c

index ac95bb8c3c8ed83b7519038d244b7e72234a3ead..733ab68b3815056cafc16eaa64dd4634bb56bc5b 100644 (file)
@@ -224,7 +224,7 @@ int main(int ac, char **av)
     if (check_lockfile("afpd", _PATH_AFPDLOCK) != 0)
         exit(EXITERR_SYS);
 
-    if (!(obj.options.flags & OPTION_DEBUG) && (daemonize(0, 0) != 0))
+    if (!(obj.cmdlineflags & OPTION_DEBUG) && (daemonize(0, 0) != 0))
         exit(EXITERR_SYS);
 
     if (create_lockfile("afpd", _PATH_AFPDLOCK) != 0)