Fix NetconfAccess not treating bools as bools
Change-Id: I024040efe78dd46e1fd89bd8e22f4942e80c7854
diff --git a/src/netconf_access.cpp b/src/netconf_access.cpp
index 9974fca..13fec88 100644
--- a/src/netconf_access.cpp
+++ b/src/netconf_access.cpp
@@ -33,7 +33,7 @@
case LY_TYPE_UINT64:
return value->uint64();
case LY_TYPE_BOOL:
- return value->bln();
+ return bool(value->bln());
case LY_TYPE_STRING:
return std::string(value->string());
case LY_TYPE_ENUM:
diff --git a/src/utils.cpp b/src/utils.cpp
index 979bda4..672cd36 100644
--- a/src/utils.cpp
+++ b/src/utils.cpp
@@ -113,6 +113,14 @@
return data;
}
+ std::string operator()(const bool& data) const
+ {
+ if (data)
+ return "true";
+ else
+ return "false";
+ }
+
template <typename T>
std::string operator()(const T& data) const
{