diff options
Diffstat (limited to 'logforwarder/src')
-rw-r--r-- | logforwarder/src/apps/vespa-logforwarder-start/cf-handler.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/logforwarder/src/apps/vespa-logforwarder-start/cf-handler.cpp b/logforwarder/src/apps/vespa-logforwarder-start/cf-handler.cpp index b4b4bdbc7f2..e34a83030e8 100644 --- a/logforwarder/src/apps/vespa-logforwarder-start/cf-handler.cpp +++ b/logforwarder/src/apps/vespa-logforwarder-start/cf-handler.cpp @@ -30,11 +30,12 @@ cfFilePath() { std::string path = vespa::Defaults::underVespaHome("var/db/vespa/splunk"); DIR *dp = opendir(path.c_str()); if (dp == NULL) { - if (errno != ENOTDIR || mkdir(path.c_str(), 0755) != 0) { + if (errno != ENOENT || mkdir(path.c_str(), 0755) != 0) { perror(path.c_str()); } + } else { + closedir(dp); } - if (dp != NULL) closedir(dp); path += "/deploymentclient.conf"; return path; } @@ -77,7 +78,6 @@ CfHandler::start(const char *configId) LOG(debug, "Reading configuration with id '%s'", configId); try { subscribe(configId, CONFIG_TIMEOUT_MS); - doConfigure(); } catch (config::ConfigTimeoutException & ex) { LOG(warning, "Timout getting config, please check your setup. Will exit and restart: %s", ex.getMessage().c_str()); exit(EXIT_FAILURE); |