summaryrefslogtreecommitdiffstats
path: root/logforwarder/src/apps/vespa-logforwarder-start/cf-handler.cpp
diff options
context:
space:
mode:
authorArne Juul <arnej@yahoo-inc.com>2017-10-03 13:43:24 +0000
committerArne Juul <arnej@yahoo-inc.com>2017-10-05 06:26:05 +0000
commit6e3ba633e61824224fc4160928f1b8bd4e81b50e (patch)
tree39ddbd0b1a66e83a0b26f3c3a7ffa5f1e377a3af /logforwarder/src/apps/vespa-logforwarder-start/cf-handler.cpp
parent4dcb4d900d6ac8143e95cf7189b40fbc464182e6 (diff)
move logforwarder.def to configdefinitions module
Diffstat (limited to 'logforwarder/src/apps/vespa-logforwarder-start/cf-handler.cpp')
-rw-r--r--logforwarder/src/apps/vespa-logforwarder-start/cf-handler.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/logforwarder/src/apps/vespa-logforwarder-start/cf-handler.cpp b/logforwarder/src/apps/vespa-logforwarder-start/cf-handler.cpp
index 13370c08b59..b4b4bdbc7f2 100644
--- a/logforwarder/src/apps/vespa-logforwarder-start/cf-handler.cpp
+++ b/logforwarder/src/apps/vespa-logforwarder-start/cf-handler.cpp
@@ -1,6 +1,10 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "cf-handler.h"
+#include <dirent.h>
+#include <stdio.h>
+#include <sys/stat.h>
+#include <sys/types.h>
#include <vespa/defaults.h>
#include <vespa/config/common/configsystem.h>
#include <vespa/config/common/exceptions.h>
@@ -26,12 +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() != 0)) {
+ if (errno != ENOTDIR || mkdir(path.c_str(), 0755) != 0) {
perror(path.c_str());
}
}
if (dp != NULL) closedir(dp);
- path += "/deploymentclient.conf;
+ path += "/deploymentclient.conf";
return path;
}
}