Subject: Re: sftp problem reading large directories

Re: sftp problem reading large directories

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 12 Mar 2012 22:57:32 +0100 (CET)

On Mon, 12 Mar 2012, Daniel Stenberg wrote:

>> It appears to be an issue with the recent change to move the window
>> adjustment from channel.c to the calling function. The sftp_read() function
>> now calls _libssh2_channel_receive_window_adjust(), but there is nothing in
>> sftp_readdir().
>
> Oops. My fault. I'll write up a fix soonish!

Thanks for a good report. I used this script:

   #!/usr/bin/perl

   my $l= 'A' x 100;
   foreach my $i (0 .. 100000) {
       my $name = $i.$l;
       open(F, ">$name") or die "stupid program: $!";
       print F $name;
       close(F);
   }

... and could easily repeat this problem locally. I then wrote a fix that
properly sends updated window size to the remote. I've now pushed my fix to
the git repo using hash 7194a9bd7ba45.

I'll appreciate if you test it and give us your comments!

-- 
  / daniel.haxx.se
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2012-03-12