commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Palkot <tpal...@gmail.com>
Subject [PATCH][COMMONS NET] TelnetInputStream Buffer Stops at 2K
Date Wed, 08 Dec 2004 02:49:20 GMT
Small fix.  Patch file attached and below.

Bug:
Building a silent telnet client, the available() method is being used
to know how much data to read.  Commands with large amounts of text,
like a "cat" return an
initial available() value of 2048, but further calls to available()
return 0, even though there is more to read.


Index: TelnetInputStream.java
===================================================================
RCS file: /home/cvspublic/jakarta-commons/net/src/java/org/apache/commons/net/telnet/TelnetInputStream.java,v
retrieving revision 1.13
diff -u -r1.13 TelnetInputStream.java
--- TelnetInputStream.java	24 Sep 2004 14:56:30 -0000	1.13
+++ TelnetInputStream.java	7 Dec 2004 00:42:07 -0000
@@ -406,6 +406,7 @@
                         __queueHead = 0;
 
                     --__bytesAvailable;
+                    __queue.notify();
 
                     return ch;
                 }

Mime
View raw message