asio: don't allow setting the same value

Setting the same value causes egregious properties changed
events. Return 0 if the user attempts to do this.

Tested-by: used dbus-monitor and noticed reduced traffic
when using set_property

Change-Id: I2643a01fd0e1cc1e0c0ed407056f0e3cd898865b
Signed-off-by: James Feist <james.feist@linux.intel.com>
diff --git a/sdbusplus/asio/object_server.hpp b/sdbusplus/asio/object_server.hpp
index f6a856a..b0698ba 100644
--- a/sdbusplus/asio/object_server.hpp
+++ b/sdbusplus/asio/object_server.hpp
@@ -204,6 +204,10 @@
             PropertyType,
             std::function<int(const PropertyType&, PropertyType&)>>>(
             propertyPtr, [](const PropertyType& req, PropertyType& old) {
+                if (old == req)
+                {
+                    return 0;
+                }
                 old = req;
                 return 1;
             });