Re: [JSch-users] stress testing jsch (+ commons-vfs)
Status: Alpha
Brought to you by:
ymnk
|
From: <ym...@jc...> - 2008-01-10 05:12:22
|
Hi,
+-From: "Jerome Lacoste" <jer...@gm...> --
|_Date: Wed, 9 Jan 2008 17:11:17 +0100 _______________
|
|You mean i == 0, right ?
>> loop and it must not be acceptable.
>> Do you mean that you had gotten the problem with 'i<=0'?
|I've fixed several bugs in the past in other projects that considered
|0 to be an EOF and this made me think there could be an issue here.
Ok, so you have not confirmed if the problem has occured without your fix.
|We can either let this patch out for the moment until I or someone
|else come with a test case, or put it in and see if the busy loop
|problem appears. What do you prefer ?
Thank you for your further testing.
For a while, I'll not apply that patch, but I'll apply the following patch,
diff -Naur jsch-0.1.36/src/com/jcraft/jsch/Session.java jsch-0.1.37/src/com/jcraft/jsch/Session.java
--- jsch-0.1.36/src/com/jcraft/jsch/Session.java Mon Oct 29 05:04:51 2007
+++ jsch-0.1.37/src/com/jcraft/jsch/Session.java Tue Jan 8 19:09:41 2008
@@ -1200,6 +1200,11 @@
if(channel==null){
break;
}
+
+ if(length[0]==0){
+ break;
+ }
+
try{
channel.write(foo, start[0], length[0]);
}
@@ -1231,7 +1236,11 @@
if(channel==null){
break;
}
- //channel.write(foo, start[0], length[0]);
+
+ if(length[0]==0){
+ break;
+ }
+
channel.write_ext(foo, start[0], length[0]);
len=length[0];
|