X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Scheduler%2FReadHelper.ct;h=6e388f3c4b354b512729712fb0b005e72aa50f2e;hb=44c966bc9d744d0926cffd5184fdb77a62564c16;hp=40ac19936dcb6e2c31d470ddf1ac9a306eee0d6b;hpb=8421c3a8da7485cb8781045494ecaab3ed84f403;p=senf.git diff --git a/Scheduler/ReadHelper.ct b/Scheduler/ReadHelper.ct index 40ac199..6e388f3 100644 --- a/Scheduler/ReadHelper.ct +++ b/Scheduler/ReadHelper.ct @@ -25,8 +25,8 @@ // Custom includes #include -#include "Utils/membind.hh" -#include "Utils/Exception.hh" +#include "../Utils/membind.hh" +#include "../Utils/Exception.hh" #include "Scheduler.hh" #define prefix_ @@ -72,7 +72,8 @@ prefix_ void senf::ReadHelper::process(Handle handle, try { if (event != senf::Scheduler::EV_READ) throw SystemException(EPIPE); - std::string rcv (handle.read(maxSize_ - data_.size())); + std::string rcv; + handle.read(rcv, maxSize_ - data_.size()); data_.append(rcv); std::string::size_type n = predicate_ ? (*predicate_)(data_) : std::string::npos; if (n != std::string::npos || data_.size() >= maxSize_ || rcv.size() == 0) { @@ -84,7 +85,7 @@ prefix_ void senf::ReadHelper::process(Handle handle, } } catch (senf::SystemException const & ex) { - errno_ = ex.err; + errno_ = ex.code(); done(); return; } @@ -118,4 +119,6 @@ operator()(std::string const & data) // c-file-style: "senf" // indent-tabs-mode: nil // ispell-local-dictionary: "american" +// compile-command: "scons -u test" +// comment-column: 40 // End: