sdbusplus: remove 'move' ops from server bindings
The generated server bindings register 'this' with sdbus, so
if a move is allowed then the object pointer left with sdbus
no longer exists. Disallow 'move' operations to prevent this.
Fixes openbmc/sdbusplus#6.
Change-Id: I470b1372042d21ce14ad0cd9bc1af68e7394bcb9
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/tools/sdbusplus/templates/interface.mako.server.hpp b/tools/sdbusplus/templates/interface.mako.server.hpp
index 77b9ab9..1879fd8 100644
--- a/tools/sdbusplus/templates/interface.mako.server.hpp
+++ b/tools/sdbusplus/templates/interface.mako.server.hpp
@@ -22,15 +22,16 @@
* Not allowed:
* - Default constructor to avoid nullptrs.
* - Copy operations due to internal unique_ptr.
+ * - Move operations due to 'this' being registered as the
+ * 'context' with sdbus.
* Allowed:
- * - Move operations.
* - Destructor.
*/
${classname}() = delete;
${classname}(const ${classname}&) = delete;
${classname}& operator=(const ${classname}&) = delete;
- ${classname}(${classname}&&) = default;
- ${classname}& operator=(${classname}&&) = default;
+ ${classname}(${classname}&&) = delete;
+ ${classname}& operator=(${classname}&&) = delete;
virtual ~${classname}() = default;
/** @brief Constructor to put object onto bus at a dbus path.