diff options
author | venaas <venaas> | 2007-06-22 11:03:57 +0000 |
---|---|---|
committer | venaas <venaas@e88ac4ed-0b26-0410-9574-a7f39faa03bf> | 2007-06-22 11:03:57 +0000 |
commit | 5858558fb347bb5e0d68473099ebe06b0dc327b5 (patch) | |
tree | cf5a2cedd0b7df8b011b8908dcff2672ccf64016 /debug.c | |
parent | 71fab9c3e4b7f71148081249321f9509d997a334 (diff) |
segfault when logging that couldn't open log file fixed, now log to stderr
git-svn-id: https://svn.testnett.uninett.no/radsecproxy/branches/release-1.0@150 e88ac4ed-0b26-0410-9574-a7f39faa03bf
Diffstat (limited to 'debug.c')
-rw-r--r-- | debug.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -62,9 +62,11 @@ int debug_set_destination(char *dest) { if (!strncasecmp(dest, "file:///", 8)) { debug_file = fopen(dest + 7, "a"); - if (!debug_file) + if (!debug_file) { + debug_file = stderr; debugx(1, DBG_ERR, "Failed to open logfile %s\n%s", dest + 7, strerror(errno)); + } setvbuf(debug_file, NULL, _IONBF, 0); return 1; } |