Hello,


I have downloaded libssh2 version 0.18 and compiled one of the sample
programs (example\simple\sftp.c) which came with the library on a
Windows system.

Using this sample executable, I wanted to read a 17 megabyte remote file
using the public key authentication.



I also changed the buffer size from 1024 bytes to 256k bytes in line 224
of example\simple\sftp.c.

So following change is made to the buffer size.



From

        char mem[1024]; //1k buffer



To

        char mem[262144]; // 256k buffer



Upon the completion of the first call to "rc =
libssh2_sftp_read(sftp_handle, mem, sizeof(mem));" in line 228 of the
sftp.c,

the "rc" variable is assigned "-1" indicating that the reading failed.



Using the libssh2_session_last_error call to retrieve the last error, I
get the error code of -30 and the error message of "Timeout waiting for
status message".



It seems like this buffer limit is imposed around 40k bytes.

Anything below this limit, the remote file can be read using this
library successfully.



Does anyone know why this happens?



Thank you.

_____________________________________________________________________________

ATTENTION:

The information contained in this message (including any files transmitted 
with this message) may contain proprietary, trade secret or other 
confidential and/or legally privileged information. Any pricing 
information contained in this message or in any files transmitted with 
this message is always confidential and cannot be shared with any third 
parties without prior written approval from Syncsort. This message is 
intended to be read only by the individual or entity to whom it is 
addressed or by their designee. If the reader of this message is not the 
intended recipient, you are on notice that any use, disclosure, copying or 
distribution of this message, in any form, is strictly prohibited. If you 
have received this message in error, please immediately notify the sender 
and/or Syncsort and destroy all copies of this message in your possession, 
custody or control.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
libssh2-devel mailing list
libssh2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libssh2-devel

Reply via email to