Patch for vls-0.5.6 telnet session

John Wehle <[email protected]> Wed, 9 Jun 2004 00:04:58 -0400 (EDT)
Newsgroups gmane.comp.video.videolan.vls.devel
Message-ID <[email protected]>
Currently the telnet transmission parameters are sent just prior
to the login prompt.  This makes it more difficult for another
program to parse the network stream from the telnet server
built into vls.  This patch merely ensures that a "\r\n" appears
just prior to the login prompt which simplifies driving vls
over the network from another program.  It's been tested on
FreeBSD 4.10 x86.

-- John Wehle
------------------8<------------------------8<------------------------
*** src/server/telnet.cpp.ORIGINAL	Wed Mar  5 23:19:20 2003
--- src/server/telnet.cpp	Thu May 27 02:00:09 2004
*************** void C_TelnetSession::OnInit()
*** 347,359 ****
    // Actual initialisation is done internally in small pieces cause it could
    // block the entire server if done in one single step. For now just send
    // the welcome message
!   m_cStream << "\r\n" << WELCOME << "\r\n\r\n";
  
    // Transmission parameters: to be able to deal with all clients, editing is
    // done on the server
    m_cStream << m_cOptions.Request(WILL, TELOPT_ECHO);
    m_cStream << m_cOptions.Request(WILL, TELOPT_SGA);
    m_cStream << m_cOptions.Request(DONT, TELOPT_LINEMODE);
  
    m_cStream << LOGIN;
    m_iPhase = LOGIN_PHASE;
--- 347,361 ----
    // Actual initialisation is done internally in small pieces cause it could
    // block the entire server if done in one single step. For now just send
    // the welcome message
!   m_cStream << "\r\n" << WELCOME << "\r\n";
  
    // Transmission parameters: to be able to deal with all clients, editing is
    // done on the server
    m_cStream << m_cOptions.Request(WILL, TELOPT_ECHO);
    m_cStream << m_cOptions.Request(WILL, TELOPT_SGA);
    m_cStream << m_cOptions.Request(DONT, TELOPT_LINEMODE);
+ 
+   m_cStream << "\r\n";
  
    m_cStream << LOGIN;
    m_iPhase = LOGIN_PHASE;
-------------------------------------------------------------------------
|   Feith Systems  |   Voice: 1-215-646-8000  |  Email: [email protected]  |
|    John Wehle    |     Fax: 1-215-540-5495  |                         |
-------------------------------------------------------------------------

-- 
This is the vls-devel mailing-list, see http://www.videolan.org/streaming/
To unsubscribe, please read http://developers.videolan.org/lists.html
If you are in trouble, please contact <[email protected]>