X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=server.c;h=0f2967b3317e13f5272964fca46f136d44774bfa;hp=bc143039563b830b07164efd96ac76a4f6d3e267;hb=c387b216b5fd3c944053e1bba024815719e9a0d9;hpb=9b565c60fd159e12d255bb18db9dbff066deebea diff --git a/server.c b/server.c index bc143039..0f2967b3 100644 --- a/server.c +++ b/server.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 1997-2010 Andre Noll + * Copyright (C) 1997-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -23,9 +23,9 @@ * The gory details, listed by topic: * * - Audio format handlers: \ref send_common.c \ref mp3_afh.c, - * \ref ogg_afh.c, \ref aac_afh.c, \ref wma_afh.c, + * \ref ogg_afh.c, \ref aac_afh.c, \ref wma_afh.c, \ref spx_afh.c * - Decoders: \ref mp3dec_filter.c, \ref oggdec_filter.c, - * \ref aacdec_filter.c, \ref wmadec_filter.c, + * \ref aacdec_filter.c, \ref wmadec_filter.c, spxdec_filter.c, * - Volume normalizer: \ref compress_filter.c, * - Output: \ref alsa_write.c, \ref osx_write.c, \ref oss_write.c, * - http: \ref http_recv.c, \ref http_send.c, @@ -65,9 +65,9 @@ #include #include #include -#include #include #include +#include #include "para.h" #include "error.h" @@ -77,11 +77,11 @@ #include "string.h" #include "afs.h" #include "server.h" +#include "list.h" +#include "send.h" #include "vss.h" #include "config.h" #include "close_on_fork.h" -#include "list.h" -#include "send.h" #include "net.h" #include "daemon.h" #include "ipc.h" @@ -146,17 +146,14 @@ static int want_colors(void) static void init_colors_or_die(void) { - int ret, i; + int i; if (!want_colors()) return; daemon_set_flag(DF_COLOR_LOG); daemon_set_default_log_colors(); - for (i = 0; i < conf.log_color_given; i++) { - ret = daemon_set_log_color(conf.log_color_arg[i]); - if (ret < 0) - exit(EXIT_FAILURE); - } + for (i = 0; i < conf.log_color_given; i++) + daemon_set_log_color_or_die(conf.log_color_arg[i]); } /* @@ -428,6 +425,7 @@ static void init_server_command_task(int argc, char **argv) if (ret < 0) goto err; add_close_on_fork_list(sct->listen_fd); /* child doesn't need the listener */ + sprintf(sct->task.status, "server command task"); register_task(&sct->task); return; err: