You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2003/05/30 13:50:37 UTC

DO NOT REPLY [Bug 20354] New: - [telnet] unable to register option hamdlers if option > 39

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20354>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20354

[telnet] unable to register option hamdlers if option > 39

           Summary: [telnet] unable to register option hamdlers if option >
                    39
           Product: Commons
           Version: 1.0 Final
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Net
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: javac@eml.cc


In the TelnetOption class the following costants are declared

public static final int MAX_OPTION_VALUE = 255;
public static int NEW_ENVIRONMENT_VARIABLES = 39;
private static int __LAST_OPTION = NEW_ENVIRONMENT_VARIABLES;

Setting __LAST_OPTION = NEW_ENVIRONMENT_VARIABLES prevents any registration of
option handlers if option code is > 39(a InvalidTelnetOptionException is rised
with error Invalid Option Code).

A workaround is changing the LAST_OPTION declaration to 

private static int __LAST_OPTION = MAX_OPTION_VALUE;

but this only partially fix the problem because the getOption() method, which
converts option code to name, will fail if  the table size and content are not
updated.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org