Add 'unflatten' to doxygen/dot processing
[senf.git] / Utils / Termlib / Telnet.cc
index 23e6984..19b9058 100644 (file)
@@ -27,6 +27,7 @@
 //#include "Telnet.ih"
 
 // Custom includes
+#include <boost/algorithm/string/case_conv.hpp>
 #include "../membind.hh"
 #include "../Logger/SenfLog.hh"
 
@@ -350,7 +351,8 @@ prefix_ void senf::term::BaseTelnetProtocol::writeHandler(int state)
         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();
 }
@@ -402,7 +404,7 @@ prefix_ void senf::term::BaseTelnetProtocol::response(OptInfo & info, bool enabl
     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;
@@ -455,6 +457,7 @@ v_handleOptionParameters(std::string const & data)
         return;
     if (data[0] == '\x00') {
         type_ = data.substr(1);
+        boost::algorithm::to_lower(type_);
         decrementRequestCounter();
     }
 }