diff options
author | venaas <venaas> | 2007-06-22 11:04:05 +0000 |
---|---|---|
committer | venaas <venaas@e88ac4ed-0b26-0410-9574-a7f39faa03bf> | 2007-06-22 11:04:05 +0000 |
commit | 7a076e9094c424c5d59560d0f84fc8d996e8fcb1 (patch) | |
tree | 40b25d612847a1332439b08c23cac9b6b7f171c1 | |
parent | 831b9348471933f3460a738e1bc5b4a43aaa45c1 (diff) |
segfault when logging that couldn't open log file fixed, now log to stderr
git-svn-id: https://svn.testnett.uninett.no/radsecproxy/trunk@151 e88ac4ed-0b26-0410-9574-a7f39faa03bf
-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; } |