X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=senf%2FPPI%2FEvents.cc;h=c866a861870c4ec3336ac086810dda14206d09c1;hb=9bc655e14d2d8c204ed835896cb51e42d49bd68f;hp=7aa02989e50ed191fcd3a4f02da811d99c86d058;hpb=601d1f509f5bb24df167a4dd5a20da67a0af9af8;p=senf.git diff --git a/senf/PPI/Events.cc b/senf/PPI/Events.cc index 7aa0298..c866a86 100644 --- a/senf/PPI/Events.cc +++ b/senf/PPI/Events.cc @@ -28,6 +28,7 @@ // Custom includes #include "Route.hh" +#include "EventManager.hh" //#include "Events.mpp" #define prefix_ @@ -36,6 +37,12 @@ /////////////////////////////////////////////////////////////////////////// // senf::ppi::EventDescriptor +prefix_ senf::ppi::EventDescriptor::~EventDescriptor() +{ + if (binding_) + binding_->manager().destroyEvent(*this); +} + prefix_ void senf::ppi::EventDescriptor::notifyUnthrottle() { Routes::const_iterator i (routes_.begin()); @@ -43,7 +50,7 @@ prefix_ void senf::ppi::EventDescriptor::notifyUnthrottle() for (; i != i_end; ++i) if ((*i)->throttled()) break; - if (i != i_end) + if (i != i_end) return; throttled_ = false; enabled(true); @@ -51,7 +58,7 @@ prefix_ void senf::ppi::EventDescriptor::notifyUnthrottle() prefix_ void senf::ppi::EventDescriptor::enabled(bool v) { - SENF_ASSERT(v_isRegistered() && "Module::registerEvent() call missing"); + SENF_ASSERT(v_isRegistered(), "Module::registerEvent() call missing"); if (throttled_ && v) return; if (v && ! enabled_)