gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnurl] 08/125: libssh2: send the correct CURLE error code


From: gnunet
Subject: [GNUnet-SVN] [gnurl] 08/125: libssh2: send the correct CURLE error code on scp file not found
Date: Sun, 21 Jan 2018 23:41:03 +0100

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to branch master
in repository gnurl.

commit 75427291e5e06afed7aff0de992cad2cbec5a214
Author: Nikos Mavrogiannopoulos <address@hidden>
AuthorDate: Thu Oct 26 11:08:43 2017 +0200

    libssh2: send the correct CURLE error code on scp file not found
    
    That also updates tests to expect the right error code
    
    libssh2 back-end returns CURLE_SSH error if the remote file
    is not found. Expect instead CURLE_REMOTE_FILE_NOT_FOUND
    which is sent by the libssh backend.
    
    Signed-off-by: Nikos Mavrogiannopoulos <address@hidden>
---
 lib/ssh.c          | 5 +++++
 tests/data/test605 | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/lib/ssh.c b/lib/ssh.c
index 54f08edf7..e0e88632d 100644
--- a/lib/ssh.c
+++ b/lib/ssh.c
@@ -261,6 +261,11 @@ static CURLcode libssh2_session_error_to_CURLE(int err)
     case LIBSSH2_ERROR_NONE:
       return CURLE_OK;
 
+    /* This is the error returned by libssh2_scp_recv2
+     * on unknown file */
+    case LIBSSH2_ERROR_SCP_PROTOCOL:
+      return CURLE_REMOTE_FILE_NOT_FOUND;
+
     case LIBSSH2_ERROR_SOCKET_NONE:
       return CURLE_COULDNT_CONNECT;
 
diff --git a/tests/data/test605 b/tests/data/test605
index 1c162fca5..94329a528 100644
--- a/tests/data/test605
+++ b/tests/data/test605
@@ -24,7 +24,7 @@ SCP retrieval of nonexistent file
 # Verify data after the test has been "shot"
 <verify>
 <errorcode>
-79
+78
 </errorcode>
 <valgrind>
 disable

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]