aboutsummaryrefslogtreecommitdiff
path: root/external/unbound/winrc/win_svc.c
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2015-12-30 12:57:50 +0200
committerRiccardo Spagni <ric@spagni.net>2015-12-30 12:57:50 +0200
commit2d43ae806359c89818c0519d81a65ded768746d8 (patch)
treec5ca4144a8f721efb0b4d051ee604f2694e6df64 /external/unbound/winrc/win_svc.c
parentno longer need to pass the size to rapidjson (diff)
downloadmonero-2d43ae806359c89818c0519d81a65ded768746d8.tar.xz
update unbound, fix unbound openssl issue on OS X
Diffstat (limited to '')
-rw-r--r--external/unbound/winrc/win_svc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/external/unbound/winrc/win_svc.c b/external/unbound/winrc/win_svc.c
index 57a160d6a..9d6926dbe 100644
--- a/external/unbound/winrc/win_svc.c
+++ b/external/unbound/winrc/win_svc.c
@@ -333,15 +333,17 @@ service_init(int r, struct daemon** d, struct config_file** c)
verbose(VERB_QUERY, "winservice - apply settings");
/* apply settings and init */
verbosity = cfg->verbosity + service_cmdline_verbose;
+ w_config_adjust_directory(cfg);
if(cfg->directory && cfg->directory[0]) {
- if(chdir(cfg->directory)) {
+ char* dir = cfg->directory;
+ if(chdir(dir)) {
log_err("could not chdir to %s: %s",
- cfg->directory, strerror(errno));
+ dir, strerror(errno));
if(errno != ENOENT)
return 0;
log_warn("could not change directory - continuing");
} else
- verbose(VERB_QUERY, "chdir to %s", cfg->directory);
+ verbose(VERB_QUERY, "chdir to %s", dir);
}
log_init(cfg->logfile, cfg->use_syslog, cfg->chrootdir);
if(!r) report_status(SERVICE_START_PENDING, NO_ERROR, 2400);