From: Jamie Gilbertson Date: Sun, 11 Mar 2012 06:02:11 +0000 (-0700) Subject: Honor the debug option (we fork before parsing config) X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=netatalk.git;a=commitdiff_plain;h=c397c5f72d8d22473229c644e3d0b0a0fd786217 Honor the debug option (we fork before parsing config) 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 --- diff --git a/etc/afpd/main.c b/etc/afpd/main.c index ac95bb8c..733ab68b 100644 --- a/etc/afpd/main.c +++ b/etc/afpd/main.c @@ -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)