On Jul 4, 2007, at 10:08 AM, Gavrie Philipson wrote:

> Hi,
>
> I'm using libssh2 (incidentally, together with curl) to upload a file
> to a remote host using the SCP protocol
> Now, if the remote side returns an error message such as "Permission
> denied" or "No such file or directory", it is not reported by libssh2.
> Instead, the generic message "Invalid ACK response from remote" is
> reported.
>
> The attached patch reads the remote error message, and reports it in a
> way similar to the command-line scp(1) command.
>
> To see its effect, when using curl normally, this is what happens on a
> "Permission denied" error:
>
> Without the patch:

That patch breaks the code.  Since you are calling  
libssh2_channel_read_ex() in one point you have to create a new state  
so that when PACKET_EAGAIN is returned the code can return to the  
exact same location and only do the libssh2_channel_read_ex() read  
call with the exact same data.  BUT, the concept is good and a step  
in the right direction.  Let me take a look and see if I can fix the  
patch.

Jim

--

/"\   ASCII Ribbon Campaign  .
\ / - NO HTML/RTF in e-mail  .
  X  - NO Word docs in e-mail .
/ \ -----------------------------------------------------------------
                      http://www.FreeBSD.org     The Power to Serve
[EMAIL PROTECTED]  http://www.TheHousleys.net
---------------------------------------------------------------------
Progress (n) : What led from smart users in front of dumb terminals to
dumb users in front of smart terminals.



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
libssh2-devel mailing list
libssh2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libssh2-devel

Reply via email to