]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - audiod.c
Implement colored logging for para_server.
[paraslash.git] / audiod.c
index 63d42cacb5218b92a8cea76c8a0626349437b8e6..12aa9d7a88916b42a59fdd7fbeb14be3b9583dbb 100644 (file)
--- a/audiod.c
+++ b/audiod.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2008 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2005-2009 Andre Noll <maan@systemlinux.org>
  *
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
@@ -207,7 +207,7 @@ __printf_2_3 void para_log(int ll, const char* fmt,...)
        tm = localtime(&t1);
        strftime(str, MAXLINE, "%b %d %H:%M:%S", tm);
        fprintf(outfd, "%s %s ", str, hostname);
-       if (conf.loglevel_arg <= INFO)
+       if (conf.loglevel_arg <= LL_INFO)
                fprintf(outfd, "%i ", ll);
        va_start(argp, fmt);
        vfprintf(outfd, fmt, argp);
@@ -1136,7 +1136,7 @@ int main(int argc, char *argv[])
        valid_fd_012();
        audiod_cmdline_parser_ext(argc, argv, &conf, &params);
        HANDLE_VERSION_FLAG("audiod", conf);
-       para_drop_privileges(conf.user_arg, conf.group_arg);
+       drop_privileges_or_die(conf.user_arg, conf.group_arg);
        parse_config_or_die();
        if (conf.logfile_given)
                logfile = open_log(conf.logfile_arg);