]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
Gavrie Philipson provided a patch that will use a more specific error
authorJames Housley <jim@thehousleys.net>
Thu, 5 Jul 2007 12:48:34 +0000 (12:48 +0000)
committerJames Housley <jim@thehousleys.net>
Thu, 5 Jul 2007 12:48:34 +0000 (12:48 +0000)
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.

CHANGES
lib/ssh.c

diff --git a/CHANGES b/CHANGES
index 218d28df566749a6a66eeccf3830fdab3ae6e334..2557530c2957675c401219f974ba955b1ffab6d5 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -6,6 +6,12 @@
 
                                   Changelog
 
+James H (5 July 2007)
+- 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.
+
 Daniel S (1 July 2007)
 - Thomas J. Moore provided a patch that introduces Kerberos5 support in
   libcurl. This also makes the options change name to --krb (from --krb4) and
index de3382698792e4ed77cad459735cca9f038f2ec5..6b21c5a8c6986153ce0d3cca27cc9201dac0da56 100644 (file)
--- a/lib/ssh.c
+++ b/lib/ssh.c
@@ -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) */