diff --git a/PPI/IntervalTimer.test.cc b/PPI/IntervalTimer.test.cc index b32cc31fa5da84a4739cf81d65ac466b8c64b303..45f87f9ad8f3144a3947be7a2c5ea10257252d50 100644 --- a/PPI/IntervalTimer.test.cc +++ b/PPI/IntervalTimer.test.cc @@ -56,7 +56,7 @@ namespace { unsigned n; public: - TimerTest(senf::ClockService::clock_type d_, unsigned n_) + TimerTest(senf::ClockService::int64_type d_, unsigned n_) : timer ( senf::ClockService::milliseconds(d_) ), n ( n_ ) { @@ -73,13 +73,13 @@ namespace { BOOST_AUTO_UNIT_TEST(intervalTimer) { - TimerTest timer (100,4); + TimerTest timer (100,3); senf::ClockService::clock_type start (senf::ClockService::now()); senf::ppi::run(); BOOST_CHECK_PREDICATE( is_close_clock, (senf::ClockService::now()) (start+senf::ClockService::milliseconds(300)) - (senf::ClockService::milliseconds(100)) ); + (senf::ClockService::milliseconds(80)) ); } ///////////////////////////////cc.e//////////////////////////////////////// diff --git a/PPI/SocketSource.ct b/PPI/SocketSource.ct index 7ea550697552e457d3b4acd7c86bf0506cd985ca..a5738583189ed6d87dd6e6fe9738dca2dcc290a9 100644 --- a/PPI/SocketSource.ct +++ b/PPI/SocketSource.ct @@ -46,12 +46,18 @@ prefix_ Packet senf::ppi::DgramReader<Packet>::operator()(Handle handle) template <class Reader> prefix_ senf::ppi::module::ActiveSocketSource<Reader>::ActiveSocketSource() -{} +{ + registerEvent( event_, &ActiveSocketSource::read ); + route(event_, output); +} template <class Reader> prefix_ senf::ppi::module::ActiveSocketSource<Reader>::ActiveSocketSource(Reader reader) : reader_(reader) -{} +{ + registerEvent( event_, &ActiveSocketSource::read ); + route(event_, output); +} template <class Reader> prefix_ senf::ppi::module::ActiveSocketSource<Reader>::