commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r962952 - /commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/telnet/TelnetInputStream.java
Date Sun, 11 Jul 2010 00:22:16 GMT
Author: sebb
Date: Sun Jul 11 00:22:15 2010
New Revision: 962952

URL: http://svn.apache.org/viewvc?rev=962952&view=rev
Log:
NET-329 TelnetInoutStream#__read() bug in the __receiveState handling for the _STATE_IAC state.

Modified:
    commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/telnet/TelnetInputStream.java

Modified: commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/telnet/TelnetInputStream.java
URL: http://svn.apache.org/viewvc/commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/telnet/TelnetInputStream.java?rev=962952&r1=962951&r2=962952&view=diff
==============================================================================
--- commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/telnet/TelnetInputStream.java
(original)
+++ commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/telnet/TelnetInputStream.java
Sun Jul 11 00:22:15 2010
@@ -194,12 +194,12 @@ final class TelnetInputStream extends Bu
                 /* TERMINAL-TYPE option (end)*/
                 case TelnetCommand.IAC:
                     __receiveState = _STATE_DATA;
-                    break;
+                    break; // exit to enclosing switch to return IAC from read
                 default:
-                    break;
+                    __receiveState = _STATE_DATA;           
+                    continue; // move on the next char, i.e. ignore IAC+unknown
                 }
-                __receiveState = _STATE_DATA;
-                continue;
+                break; // exit and return from read
             case _STATE_WILL:
                 synchronized (__client)
                 {



Mime
View raw message