Utils/Termlib: Convert received terminal type string to lowercase (fixes OpenBSD...
g0dil [Tue, 3 Mar 2009 13:33:27 +0000 (13:33 +0000)]
git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1140 270642c3-0616-0410-b53a-bc976706d245

Utils/Termlib/Telnet.cc
Utils/Termlib/TelnetTerminal.cc

index 5c79e1f..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"
 
@@ -456,6 +457,7 @@ v_handleOptionParameters(std::string const & data)
         return;
     if (data[0] == '\x00') {
         type_ = data.substr(1);
+        boost::algorithm::to_lower(type_);
         decrementRequestCounter();
     }
 }
index 2699f9c..3445d5c 100644 (file)
@@ -82,8 +82,12 @@ prefix_ void senf::term::TelnetTerminal::v_setupComplete()
             log << "TelnetTerminal setup failed:\n";
             if (width() <= 0)
                 log << "    missing telnet client NAWS support\n";
+            else
+                log << "    size=" << width() << "x" << height() << "\n";
             if (terminalType().empty())
                 log << "    missing telnet client TERMINAL_TYPE support\n";
+            else
+                log << "    TERM=" << terminalType() << "\n";
             if (! localOption(telnetopt::SUPPRESS_GO_AHEAD) ||
                 ! peerOption(telnetopt::SUPPRESS_GO_AHEAD))
                 log << "    missing telnet clinet SGO support\n";