From: g0dil Date: Fri, 20 Mar 2009 13:38:24 +0000 (+0000) Subject: PPI: Fix IntervalTimer unit test X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=0ac00fc320512d853e605297fc9435bcad9861ea;p=senf.git PPI: Fix IntervalTimer unit test git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1164 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/PPI/IntervalTimer.test.cc b/PPI/IntervalTimer.test.cc index b32cc31..45f87f9 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 7ea5506..a573858 100644 --- a/PPI/SocketSource.ct +++ b/PPI/SocketSource.ct @@ -46,12 +46,18 @@ prefix_ Packet senf::ppi::DgramReader::operator()(Handle handle) template prefix_ senf::ppi::module::ActiveSocketSource::ActiveSocketSource() -{} +{ + registerEvent( event_, &ActiveSocketSource::read ); + route(event_, output); +} template prefix_ senf::ppi::module::ActiveSocketSource::ActiveSocketSource(Reader reader) : reader_(reader) -{} +{ + registerEvent( event_, &ActiveSocketSource::read ); + route(event_, output); +} template prefix_ senf::ppi::module::ActiveSocketSource::