From: Pierre Habouzit Date: Wed, 29 Aug 2007 16:58:26 +0000 (+0200) Subject: Don't hardcode srsd as the daemon name, use a define. X-Git-Url: http://git.madism.org/?a=commitdiff_plain;h=28f081e506a26a01ea1b47f106ef77b05acc7d23;p=apps%2Fpfixtools.git Don't hardcode srsd as the daemon name, use a define. Signed-off-by: Pierre Habouzit --- diff --git a/srsd.c b/srsd.c index cd5c125..4004c13 100644 --- a/srsd.c +++ b/srsd.c @@ -45,6 +45,7 @@ #include "mem.h" #include "buffer.h" +#define DAEMON_NAME "srsd" #define DEFAULT_ENCODER_PORT 10000 #define DEFAULT_DECODER_PORT 10001 #define __tostr(x) #x @@ -165,7 +166,7 @@ int start_listener(int epollfd, int port, bool decoder) static int main_initialize(void) { - openlog("srsd", LOG_PID, LOG_MAIL); + openlog(DAEMON_NAME, LOG_PID, LOG_MAIL); signal(SIGPIPE, SIG_IGN); signal(SIGINT, &common_sighandler); signal(SIGTERM, &common_sighandler); @@ -185,7 +186,7 @@ module_exit(main_shutdown); void usage(void) { - fputs("usage: srsd [ -e ] [ -d ] domain secrets\n" + fputs("usage: "DAEMON_NAME" [ -e ] [ -d ] domain secrets\n" "\n" " -e port to listen to for encoding requests\n" " (default: "STR(DEFAULT_ENCODER_PORT)")\n"