Re: [libssh2] libssh2_sftp_read() with large buffer fails

2008-12-13 Thread Markus Moeller
Since I experienced a similar issue when using curl with sftp I run the sample with some debug and got to the point where in libssh2_sftp.h the maximal packet length is defined as 4. Where does this maximum come from ? Is it an arbitrary value or somewhere defined in the ssh/sftp protoco

Re: [libssh2] libssh2_sftp_read() with large buffer fails

2008-12-13 Thread Markus Moeller
libssh2_htonu64(s, handle->u.file.offset); s += 8; libssh2_htonu32(s, buffer_maxlen); s += 4; sftp->read_state = libssh2_NB_state_created; } "Markus Moeller" wrote in message news:gi0gi8$lk...@ger.gmane.org... > Since I e

Re: [libssh2] libssh2_sftp_read() with large buffer fails

2008-12-13 Thread Markus Moeller
npgbe.fr... > On Sat, 13 Dec 2008, Markus Moeller wrote: > > (Please trim your quotes) > >> The server can only answer with a size which was set before by the client >> (otherwise it is a server bug). As far as I understand the buffer size >> is >> send as pa

Re: [libssh2] libssh2_sftp_read() with large buffer fails

2008-12-14 Thread Markus Moeller
[libssh2] SFTP Subsystem: Requesting 16384 bytes from SFTP handle [libssh2] SFTP Subsystem: Asking for 103 packet [libssh2] SFTP Subsystem: Asking for 101 packet [libssh2] SFTP Subsystem: Waiting for packet "Markus Moeller" wrote in message news:gi12or$9q...@ger.gmane.org... > Th

Re: [libssh2] libssh2_sftp_read() with large buffer fails

2008-12-18 Thread Markus Moeller
Should I open a bug for this on sourceforge ? Markus "Markus Moeller" wrote in message news:gi12or$9q...@ger.gmane.org... > The test from Alexander works. I need to check on the curl issue again. > Unfortunately the server I had the issue with isn't available at the >

Re: [libssh2] libssh2_sftp_read() with large buffer fails

2008-12-18 Thread Markus Moeller
"Daniel Stenberg" wrote in message news:alpine.lrh.2.00.0812182112120.22...@yvahk3.pbagnpgbe.fr... > On Thu, 18 Dec 2008, Markus Moeller wrote: > >> Should I open a bug for this on sourceforge ? > > I don't think submitting anything there helps a lot - a

Re: [libssh2] Upload error with curl scp on Windows

2009-02-05 Thread Markus Moeller
"Daniel Stenberg" wrote in message news:alpine.deb.1.10.0902040905110.27...@yvahk2.pbagnpgbe.fr... > On Tue, 3 Feb 2009, Markus Moeller wrote: > >>> [libssh2] Connection: Sending 39 bytes on channel 0/0, stream_id=0 >>> [libssh2] Connection: libssh2_packet_w

Re: [libssh2] Upload error with curl scp on Windows

2009-02-06 Thread Markus Moeller
I did some more debug. Here are my questions: Normal: Curl_write calls Curl_scp_send MMM Curl_scp_send after libssh2_channel_write len/nwrite 16384/16384 MMM Curl_write after Curl_scp_send len/nwrite 16384/16384 MMM Curl_scp_send after libssh2_channel_write len/nwrite 16384/16384 MMM

Re: [libssh2] Upload error with curl scp on Windows

2009-02-06 Thread Markus Moeller
"Markus Moeller" wrote in message news:gmi9el$hi...@ger.gmane.org... >I did some more debug. Here are my questions: > > Normal: > Curl_write calls Curl_scp_send > > MMM Curl_scp_send after libssh2_channel_write len/nwrite 16384/16384 > MMM Curl_write

Re: [libssh2] Upload error with curl scp on Windows (seems to be a libssh2 bug)

2009-02-07 Thread Markus Moeller
I think I now know under which rare circumstances this happens and it is a bug in libssh2. I can simulate it with (e.g. a packet is not completly written and the attempt to write the rest creates EAGAIN): In below simulation the 10 packet is reduced by 30 bytes and the attempt to write the 30