diff options
Diffstat (limited to 'src/propertywatchimpl.hpp')
-rw-r--r-- | src/propertywatchimpl.hpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/propertywatchimpl.hpp b/src/propertywatchimpl.hpp index 6e957ae..d0153e4 100644 --- a/src/propertywatchimpl.hpp +++ b/src/propertywatchimpl.hpp @@ -3,6 +3,7 @@ #include <sdbusplus/message.hpp> #include <sdbusplus/bus/match.hpp> #include <vector> +#include "callback.hpp" #include "data_types.hpp" #include "propertywatch.hpp" @@ -141,6 +142,12 @@ void PropertyWatchOfType<T, DBusInterfaceType>::propertiesChanged( } std::get<2>(item->second).get() = p.second.template get<T>(); + + // Invoke callback if present. + if (this->alreadyRan && this->callback) + { + (*this->callback)(); + } } } |