diff options
author | Kozlov Dmitry <dima@server> | 2010-09-01 19:29:43 +0400 |
---|---|---|
committer | Kozlov Dmitry <dima@server> | 2010-09-01 19:29:43 +0400 |
commit | 2b63c6e6e368d6ea39584a70ddb81a88e0924c47 (patch) | |
tree | 790cc5d46e691b4b920170b7dfde40d3c6ec4be6 /accel-pptpd/triton/log.c | |
parent | 5bac5a2edb7bc7639c853fd0f7109dcddb7c4cee (diff) | |
download | accel-ppp-xebd-2b63c6e6e368d6ea39584a70ddb81a88e0924c47.tar.gz accel-ppp-xebd-2b63c6e6e368d6ea39584a70ddb81a88e0924c47.zip |
rewriting triton library ...
Diffstat (limited to 'accel-pptpd/triton/log.c')
-rw-r--r-- | accel-pptpd/triton/log.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/accel-pptpd/triton/log.c b/accel-pptpd/triton/log.c new file mode 100644 index 0000000..39a9cb1 --- /dev/null +++ b/accel-pptpd/triton/log.c @@ -0,0 +1,34 @@ +#include <stdio.h> + +#include "triton_p.h" + +static FILE *f_error; +static FILE *f_debug; + +int log_init(void) +{ + 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"); + if (!f_error) + { + perror("log:log_error:open"); + return -1; + } + } + if (log_debug) + { + f_debug=fopen(log_debug,"a"); + if (!f_debug) + { + perror("log:log_debug:open"); + return -1; + } + } + + return 0; +} + |