summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Device/Device.cpp10
-rw-r--r--src/Version.cpp2
2 files changed, 5 insertions, 7 deletions
diff --git a/src/Device/Device.cpp b/src/Device/Device.cpp
index 573e10b..bbfb189 100644
--- a/src/Device/Device.cpp
+++ b/src/Device/Device.cpp
@@ -410,13 +410,11 @@ void Device::writeJson() {
rapidjson::StringBuffer buffer;
rapidjson::Writer<rapidjson::StringBuffer> writer(buffer);
deviceInfo.Accept(writer);
- std::string json (buffer.GetString(), buffer.GetSize());
- std::ofstream of ("/var/run/config/device_info.json");
- of << json;
- if (!of.good()) {
- logError("Can't write to /var/run/config/device_info.json");
+ std::ofstream os(DEVICE_INFO_FILE);
+ if (!os) {
+ logError("Can't write to " + std::string(DEVICE_INFO_FILE));
exitHandler(99);
} else {
- exitHandler(0);
+ os << buffer.GetString();
}
}
diff --git a/src/Version.cpp b/src/Version.cpp
index 5585cc1..0786260 100644
--- a/src/Version.cpp
+++ b/src/Version.cpp
@@ -1,4 +1,4 @@
//Pre-Build Auto-Generated Source
#include "Version.h"
-const std::string Version::version("4.2.3-12-g42e11db");
+const std::string Version::version("v1.0.0");