projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
config: accept "0" and "1" as XML boolean values
[lttng-tools.git]
/
src
/
common
/
config
/
session-config.c
diff --git
a/src/common/config/session-config.c
b/src/common/config/session-config.c
index 1b7d965fa8db1c3dc4f696a74df8a03a5cf18a18..b08f40a2e319155074b39d39ddcdf427eb333442 100644
(file)
--- a/
src/common/config/session-config.c
+++ b/
src/common/config/session-config.c
@@
-843,9
+843,11
@@
int parse_bool(xmlChar *str, int *val)
goto end;
}
goto end;
}
- if (!strcmp((const char *) str, config_xml_true)) {
+ if (!strcmp((const char *) str, config_xml_true) ||
+ !strcmp((const char *) str, "1")) {
*val = 1;
*val = 1;
- } else if (!strcmp((const char *) str, config_xml_false)) {
+ } else if (!strcmp((const char *) str, config_xml_false) ||
+ !strcmp((const char *) str, "0")) {
*val = 0;
} else {
WARN("Invalid boolean value encountered (%s).",
*val = 0;
} else {
WARN("Invalid boolean value encountered (%s).",
This page took
0.023648 seconds
and
4
git commands to generate.