diff options
author | James Housley <jim@thehousleys.net> | 2007-07-05 12:48:34 +0000 |
---|---|---|
committer | James Housley <jim@thehousleys.net> | 2007-07-05 12:48:34 +0000 |
commit | 7fd4f82a45e64c8cf53a4506082ea3c0a8055354 (patch) | |
tree | 29c57941ba1f459ee3b6c3023dc17ff27ec6008d /lib | |
parent | 598bc3968e042dc597a82239bdad33b730e035a1 (diff) |
Gavrie Philipson provided a patch that will use a more specific error
message for an scp:// upload failure. If libssh2 has his matching
patch, then the error message return by the server will be used instead
of a more generic error.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ssh.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -1142,7 +1142,13 @@ CURLcode Curl_scp_do(struct connectdata *conn, bool *done) if (!scp->ssh_channel && (libssh2_session_last_errno(scp->ssh_session) != LIBSSH2_ERROR_EAGAIN)) { - return CURLE_FAILED_INIT; + int err; + char *err_msg; + + err = libssh2_session_error_to_CURLE( + libssh2_session_last_error(scp->ssh_session, &err_msg, NULL, 0)); + failf(conn->data, "%s", err_msg); + return err; } } while (!scp->ssh_channel); #else /* !(LIBSSH2_APINO >= 200706012030) */ |