#216: libssh2_scp_recv() / libssh2_scp_send(): incorrect error code ---------------------------+------------------------------------------------ Reporter: littlesavage | Owner: Type: defect | Status: new Priority: normal | Milestone: 1.2.9 Component: SCP | Version: 1.2.8 Keywords: | Blocks: Blocked By: | ---------------------------+------------------------------------------------ libssh2_session_last_error() after libssh2_scp_recv()/libssh2_scp_send() may return LIBSSH2_ERROR_SOCKET_NONE on error.
Sample perl script: {{{ #!/usr/bin/perl use strict; use Net::SSH2; my $ssh2 = Net::SSH2->new(); $ssh2->connect('localhost'); $ssh2->auth_publickey('user', './id_dsa.pub', './id_dsa'); if (!$ssh2->scp_put($0, '/nonexistent/test')) { my ($err_code, $err_name, $err_string) = $ssh2->error(); warn "scp_put error: $err_code $err_name $err_string"; } if (!$ssh2->scp_get('/nonexistent/test')) { my ($err_code, $err_name, $err_string) = $ssh2->error(); warn "scp_get error: $err_code $err_name $err_string"; } }}} libssh2_scp_recv() returns not really useful code 0: {{{ scp_put error: 0 at ./test.pl line 14. scp_get error: 0 at ./test.pl line 18. }}} with attached patch: {{{ scp_put error: -28 LIBSSH2_ERROR_SCP_PROTOCOL failed to send file at ./test.pl line 14. scp_get error: -28 LIBSSH2_ERROR_SCP_PROTOCOL Failed to recv file at ./test.pl line 18. }}} -- Ticket URL: <http://trac.libssh2.org/ticket/216> libssh2 <http://trac.libssh2.org/> C library for writing portable SSH2 clients _______________________________________________ libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel