[Commits] : Tuxbox-GIT: apps branch master updated. CVS-Final-399-g4685e71
Tuxbox Sources
Brought to you by:
dbt1
|
From: Thilo G. <tux...@ne...> - 2014-07-03 19:17:36
|
Project "Tuxbox-GIT: apps":
The branch, master has been updated
via 4685e716e4874ac871105add130f6f1e6a77c933 (commit)
from e34c5ad4e29132d04bbc4ae5b0fe0aadae18b644 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 4685e716e4874ac871105add130f6f1e6a77c933
Author: Christian Schuett <Gau...@ho...>
Date: Sat Jun 21 14:43:24 2014 +0200
libconfigfile: accept booleans as int32 or int64
for compatibility if config file entry is changed from boolean to
int32 or int64
based on patch by martii <m4...@gm...> in Neutrino-MP Git
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/misc/libs/libconfigfile/configfile.cpp b/misc/libs/libconfigfile/configfile.cpp
index b8e154b..b92fd67 100644
--- a/misc/libs/libconfigfile/configfile.cpp
+++ b/misc/libs/libconfigfile/configfile.cpp
@@ -205,6 +205,10 @@ int32_t CConfigFile::getInt32(const std::string & key, const int32_t defaultVal)
}
}
+ if (configData[key] == "false")
+ return 0;
+ if (configData[key] == "true")
+ return 1;
return atoi(configData[key].c_str());
}
@@ -227,6 +231,10 @@ int64_t CConfigFile::getInt64(const std::string & key, const int64_t defaultVal)
}
}
+ if (configData[key] == "false")
+ return 0;
+ if (configData[key] == "true")
+ return 1;
return atoll(configData[key].c_str());
}
-----------------------------------------------------------------------
Summary of changes:
misc/libs/libconfigfile/configfile.cpp | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
--
Tuxbox-GIT: apps
|