audiod.c: Don't log to /dev/null.
authorAndre Noll <maan@systemlinux.org>
Sun, 17 Feb 2008 20:52:21 +0000 (21:52 +0100)
committerAndre Noll <maan@systemlinux.org>
Sun, 17 Feb 2008 20:52:21 +0000 (21:52 +0100)
There's no point in computing the log message if we are
going to write it to /dev/null.

audiod.c

index dee31d5..65343e5 100644 (file)
--- a/audiod.c
+++ b/audiod.c
@@ -144,6 +144,8 @@ void para_log(int ll, const char* fmt,...)
 
        if (ll < conf.loglevel_arg)
                return;
+       if (!logfile && conf.daemon_given)
+               return;
        if (!hostname)
                hostname = para_hostname();
        outfd = logfile? logfile : stderr;