Merge commit '91aa6f08bcf0acbdfa038aaffe73e327ddd87c67' into maint-0.2.2

This commit is contained in:
Nick Mathewson
2011-04-25 19:03:15 -04:00
2 changed files with 9 additions and 1 deletions
+3 -1
View File
@@ -4382,11 +4382,13 @@ options_init_logs(or_options_t *options, int validate_only)
if (smartlist_len(elts) == 2 &&
!strcasecmp(smartlist_get(elts,0), "file")) {
if (!validate_only) {
if (add_file_log(severity, smartlist_get(elts, 1)) < 0) {
char *fname = expand_filename(smartlist_get(elts, 1));
if (add_file_log(severity, fname) < 0) {
log_warn(LD_CONFIG, "Couldn't open file for 'Log %s': %s",
opt->value, strerror(errno));
ok = 0;
}
tor_free(fname);
}
goto cleanup;
}