www.libssh2.org | Daily snapshots | Mailing list archive | Docs | Examples | github

Archive Index This month's Index

Subject: scp_write example is incomplete.

scp_write example is incomplete.

From: Frasse <frasse_at_fworld.se>
Date: Tue, 04 Nov 2014 09:07:46 GMT

Hi.

The scp_write example is incomplete.

According to the scp spec a completed file transfer should be followed by a single 0 that the remote machine acknowledge with a status of 0,1 or 2. If the status is not 0 then an error message can follow ending with a linefeed.

I couldn't understand why I got no indication that my uploads failed when the disk on the remote machine was full. The answer was that the code never requested the acknowledgement.

I am attaching a modified version of the example that writes out the error message to stderr.

/Frasse

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

Received on 2014-11-04

the libssh2 team