Don't allow hex strings on d-bus
Convert hex strings to uint64_t, as it's difficult
for consumers to parse.
Change-Id: Id9c3c3c8ca8ed529ce22826e2a51004cbb83ffea
Signed-off-by: James Feist <james.feist@linux.intel.com>
diff --git a/src/EntityManager.cpp b/src/EntityManager.cpp
index 29631fb..bbd83c8 100644
--- a/src/EntityManager.cpp
+++ b/src/EntityManager.cpp
@@ -1115,6 +1115,16 @@
}
}
}
+ else if (boost::starts_with(value, "0x"))
+ {
+ try
+ {
+ keyPair.value() = static_cast<uint64_t>(std::stoul(value, 0, 0));
+ }
+ catch (std::invalid_argument)
+ {
+ }
+ }
}
// reads json files out of the filesystem