#1 Patch for SFTP get and put

open
nobody
None
5
2005-12-13
2005-12-13
mattiasl
No

The get and put methods in ChannelSftp using
Input/OutputStreams in the API (ie not the direct file
transfer are broken) in jsch 0.1.24

This patch fixes the problems:

1. put() method

Problem with large buffers in the write methods to the
outputstream (caused overflow in buffer)

2. get() method

Problem when the read did not return the full amount of
data (very common if you have a little network delay).
In this case the offset was not correctly updated.

There were some minor code cleanup also.

Attached standard Unix patch. With the jsch-0.1.24 as
current directory just do
patch -p0 < ~/jsch_sftp.patch

(works for me anyway)

Discussion

  • mattiasl
    mattiasl
    2005-12-13

    ChannelSftp patch

     
    Attachments