Lots of updates to webserver.

Make ssl keys consistent (and write to the correct location)
Make sessions keyed by connection id
Clean up logging frameworks
Add new static files, and make firmware update work
Make sensors work again
Add better json handling

Change-Id: I531a0fd7d583e049949cf27aa71544808fd7642d
diff --git a/boost-dbus/include/dbus/error.hpp b/boost-dbus/include/dbus/error.hpp
index 3b07c9f..63563da 100644
--- a/boost-dbus/include/dbus/error.hpp
+++ b/boost-dbus/include/dbus/error.hpp
@@ -14,7 +14,27 @@
 
 namespace dbus {
 
-class error : public boost::system::error_category {
+namespace detail {
+
+class error_category : public boost::system::error_category {
+  const char *name() const BOOST_SYSTEM_NOEXCEPT { return "dbus.error"; }
+
+  string message(int value) const {
+    if (value)
+      return "DBus error";
+    else
+      return "no error";
+  }
+};
+
+}  // namespace detail
+
+inline const boost::system::error_category &get_dbus_category() {
+  static detail::error_category instance;
+  return instance;
+}
+
+class error {
   DBusError error_;
 
  public:
@@ -32,10 +52,6 @@
 
   ~error() { dbus_error_free(&error_); }
 
-  const char *name() const BOOST_SYSTEM_NOEXCEPT { return error_.name; }
-
-  string message(int value) const { return error_.message; }
-
   bool is_set() const { return dbus_error_is_set(&error_); }
 
   operator const DBusError *() const { return &error_; }
@@ -48,11 +64,12 @@
 };
 
 inline boost::system::error_code error::error_code() const {
-  return boost::system::error_code(is_set(), *this);
+  return boost::system::error_code(is_set(), get_dbus_category());
 }
 
 inline boost::system::system_error error::system_error() const {
-  return boost::system::system_error(error_code());
+  return boost::system::system_error(
+      error_code(), string(error_.name) + ":" + error_.message);
 }
 
 inline void error::throw_if_set() const {
@@ -61,4 +78,4 @@
 
 }  // namespace dbus
 
-#endif  // DBUS_ERROR_HPP
+#endif  // DBUS_ERROR_HPP
\ No newline at end of file