X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=PPI%2FIOEvent.cc;h=ea70efcddad888bc753130ee89459422b65b0f3e;hb=a1fdb7bb122f0b05be809a922d4b7ef5e125fa67;hp=73bcc5f68417997782929cd4f43b4ddabfedbf41;hpb=40fa3e3f1e0f639c68bd15bf469e35045f94abee;p=senf.git diff --git a/PPI/IOEvent.cc b/PPI/IOEvent.cc index 73bcc5f..ea70efc 100644 --- a/PPI/IOEvent.cc +++ b/PPI/IOEvent.cc @@ -28,7 +28,6 @@ // Custom includes #include "../Utils/senfassert.hh" -#include //#include "IOEvent.mpp" #define prefix_ @@ -42,18 +41,19 @@ prefix_ void senf::ppi::IOEvent::v_enable() { - Scheduler::instance().add(fd_, boost::bind(&IOEvent::cb,this,_1), - Scheduler::EventId(events_)); + if (fd_ != -1) + event_.enable(); } prefix_ void senf::ppi::IOEvent::v_disable() { - Scheduler::instance().remove(fd_, Scheduler::EventId(events_)); + if (fd_ != -1) + event_.disable(); } prefix_ void senf::ppi::IOEvent::cb(int event) { - if ((event & ~events_) != 0) { + if ((event & ~event_.events()) != 0) { if (event & Err) throw ErrorException(); else if (event & Hup)