// Custom includes
#include <errno.h>
-#include "Utils/membind.hh"
-#include "Utils/Exception.hh"
+#include "../Utils/membind.hh"
+#include "../Utils/Exception.hh"
#include "Scheduler.hh"
#define prefix_
// scheduler. This ensures, that the refcount is at least 1 as
// long as the helper is registered with the scheduler.
senf::Scheduler::instance()
- .add(handle,boost::bind(&ReadHelper::dispatchProcess,ptr(this),_1,_2),
+ .add(handle,boost::bind(&ReadHelper::dispatchProcess,ptr(this), handle, _1),
senf::Scheduler::EV_READ);
}
{
try {
if (event != senf::Scheduler::EV_READ)
- throw SystemException(EPIPE);
- std::string rcv (handle.read(maxSize_ - data_.size()));
+ throw SystemException(EPIPE SENF_EXC_DEBUGINFO);
+ 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) {
}
}
catch (senf::SystemException const & ex) {
- errno_ = ex.err;
+ errno_ = ex.errorNumber();
done();
return;
}
// c-file-style: "senf"
// indent-tabs-mode: nil
// ispell-local-dictionary: "american"
+// compile-command: "scons -u test"
+// comment-column: 40
// End: