diff options
author | Kozlov Dmitry <dima@server> | 2010-09-02 19:01:47 +0400 |
---|---|---|
committer | Kozlov Dmitry <dima@server> | 2010-09-02 19:01:47 +0400 |
commit | b43d224c8a306ff54bbb913c5aab891f82541f6e (patch) | |
tree | c3b6c135030fcd4bba4a2ea44d21745fba254a6c /accel-pptpd/triton/log.c | |
parent | 81515c09f55f152e8330c3b43ad159be64f494e8 (diff) | |
download | accel-ppp-xebd-b43d224c8a306ff54bbb913c5aab891f82541f6e.tar.gz accel-ppp-xebd-b43d224c8a306ff54bbb913c5aab891f82541f6e.zip |
rewriting triton library ...
Diffstat (limited to 'accel-pptpd/triton/log.c')
-rw-r--r-- | accel-pptpd/triton/log.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/accel-pptpd/triton/log.c b/accel-pptpd/triton/log.c index 7ff90f8..4504db4 100644 --- a/accel-pptpd/triton/log.c +++ b/accel-pptpd/triton/log.c @@ -9,8 +9,8 @@ static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; int log_init(void) { - char *log_error = conf_get_opt("core","log_error"); - char *log_debug = conf_get_opt("core","log_debug"); + char *log_error = conf_get_opt("core","log-error"); + char *log_debug = conf_get_opt("core","log-debug"); if (log_error) { f_error = fopen(log_error, "a"); @@ -48,8 +48,10 @@ static void do_log(FILE *f, const char *fmt, va_list ap) void triton_log_error(const char *fmt,...) { va_list ap; + if (!f_error) return; + va_start(ap, fmt); do_log(f_error, fmt, ap); } @@ -57,8 +59,10 @@ void triton_log_error(const char *fmt,...) void triton_log_debug(const char *fmt,...) { va_list ap; + if (!f_debug) return; + va_start(ap, fmt); do_log(f_debug, fmt, ap); } |