summaryrefslogtreecommitdiff
path: root/src/CommonAPI/Runtime.cpp
diff options
context:
space:
mode:
authorJuergen Gehring <juergen.gehring@bmw.de>2017-06-19 07:47:01 -0700
committerJuergen Gehring <juergen.gehring@bmw.de>2017-06-19 07:47:01 -0700
commit008f6c11f5371e93c06b3ed337326008d2031084 (patch)
treef25b96bab93d4b71496793d5944e054fc8d303af /src/CommonAPI/Runtime.cpp
parent66de998220d90116aa603d7458e245fe6094b4eb (diff)
downloadgenivi-common-api-runtime-008f6c11f5371e93c06b3ed337326008d2031084.tar.gz
CommonAPI 3.1.123.1.12
Diffstat (limited to 'src/CommonAPI/Runtime.cpp')
-rw-r--r--src/CommonAPI/Runtime.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/CommonAPI/Runtime.cpp b/src/CommonAPI/Runtime.cpp
index 221264c..b9124cd 100644
--- a/src/CommonAPI/Runtime.cpp
+++ b/src/CommonAPI/Runtime.cpp
@@ -150,6 +150,7 @@ bool
Runtime::readConfiguration() {
#define MAX_PATH_LEN 255
std::string config;
+ bool tryLoadConfig(true);
char currentDirectory[MAX_PATH_LEN];
#ifdef _WIN32
if (GetCurrentDirectory(MAX_PATH_LEN, currentDirectory)) {
@@ -163,11 +164,14 @@ Runtime::readConfiguration() {
struct stat s;
if (stat(usedConfig_.c_str(), &s) != 0) {
usedConfig_ = defaultConfig_;
+ if (stat(usedConfig_.c_str(), &s) != 0) {
+ tryLoadConfig = false;
+ }
}
}
IniFileReader reader;
- if (!reader.load(usedConfig_))
+ if (tryLoadConfig && !reader.load(usedConfig_))
return false;
std::string itsConsole("true");
@@ -367,7 +371,7 @@ Runtime::loadLibrary(const std::string &_library) {
// Check the version information
while (soStart < itsLibrary.length()) {
if (itsLibrary[soStart] != '.'
- && !std::isdigit(itsLibrary[soStart])) {
+ && !std::isdigit(static_cast<unsigned char>(itsLibrary[soStart]))) {
break;
}
soStart++;