//#include "Telnet.ih"
// Custom includes
+#include <boost/algorithm/string/case_conv.hpp>
#include "../membind.hh"
#include "../Logger/SenfLog.hh"
senf::scheduler::FdEvent::EV_WRITE, false),
pendingRequests_ (0u),
requestTimeout_ (ClockService::milliseconds(DEFAULT_REQUEST_TIMEOUT_MS)),
- timeout_ ("senf::term::BaseTelnetProtocol::timeout",
+ timeout_ ("senf::term::BaseTelnetProtocol::configTimeout",
senf::membind(&BaseTelnetProtocol::timeout, this))
{}
pendingRequests_ (0u),
requestTimeout_ (ClockService::milliseconds(DEFAULT_REQUEST_TIMEOUT_MS)),
timeout_ ("senf::term::BaseTelnetProtocol::timeout", 0)
-{}
+{
+ SENF_ASSERT( false );
+}
prefix_ void senf::term::BaseTelnetProtocol::write(std::string const & s)
{
return;
}
sendQueue_.erase(sendQueue_.begin(),
- handle_.write(std::make_pair(sendQueue_.begin(), sendQueue_.end())));
+ handle_.write(boost::make_iterator_range(
+ sendQueue_.begin(), sendQueue_.end())));
if (sendQueue_.empty())
outputEvent_.disable();
}
else if (enabled != info.enabled) {
// Request to change the current state
if (!enabled ||
- enabled && (info.wantState == OptInfo::WANTED || info.wantState == OptInfo::ACCEPTED)) {
+ (enabled && (info.wantState == OptInfo::WANTED || info.wantState == OptInfo::ACCEPTED))) {
// accept the request
info.optionState = OptInfo::ACKNOWLEDGED;
info.enabled = enabled;
return;
if (data[0] == '\x00') {
type_ = data.substr(1);
+ boost::algorithm::to_lower(type_);
decrementRequestCounter();
}
}