stun

simple point to point tunnel
git clone git://git.2f30.org/stun
Log | Files | Refs | README

commit 7688b89550911b2c2b0e99083862f2ca0fd79c70
parent 35a61a216e7a47c3ef66ed7b8033d76ae63c3b52
Author: sin <sin@2f30.org>
Date:   Tue, 12 Apr 2016 11:52:58 +0100

actually use progname

Diffstat:
Mlog.c | 7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/log.c b/log.c @@ -8,11 +8,13 @@ #include "stun.h" +static char *progname; + static void logmsg(int priority, char *msg, va_list ap) { if (foreground) { - fputs("stun: ", stderr); + fprintf(stderr, "%s: ", progname); vfprintf(stderr, msg, ap); fputc('\n', stderr); } else { @@ -23,7 +25,8 @@ logmsg(int priority, char *msg, va_list ap) void loginit(char *prog) { - openlog(prog, LOG_PID | LOG_NDELAY, LOG_DAEMON); + progname = prog; + openlog(progname, LOG_PID | LOG_NDELAY, LOG_DAEMON); } void