gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnurl] 18/125: libssh: corrected use of sftp_statvfs() in


From: gnunet
Subject: [GNUnet-SVN] [gnurl] 18/125: libssh: corrected use of sftp_statvfs() in SSH_SFTP_QUOTE_STATVFS
Date: Sun, 21 Jan 2018 23:41:13 +0100

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

ng0 pushed a commit to branch master
in repository gnurl.

commit a08f5a77ccf728740a5fccd9bd1098dea066176d
Author: Nikos Mavrogiannopoulos <address@hidden>
AuthorDate: Sun Dec 3 12:05:45 2017 +0100

    libssh: corrected use of sftp_statvfs() in SSH_SFTP_QUOTE_STATVFS
    
    The previous code was incorrectly following the libssh2 error detection
    for libssh2_sftp_statvfs, which is not correct for libssh's sftp_statvfs.
    
    Fixes #2142
    
    Signed-off-by: Nikos Mavrogiannopoulos <address@hidden>
---
 lib/ssh-libssh.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/lib/ssh-libssh.c b/lib/ssh-libssh.c
index d138959f3..1277324bf 100644
--- a/lib/ssh-libssh.c
+++ b/lib/ssh-libssh.c
@@ -989,15 +989,13 @@ static CURLcode myssh_statemach_act(struct connectdata 
*conn, bool *block)
       sftp_statvfs_t statvfs;
 
       statvfs = sftp_statvfs(sshc->sftp_session, sshc->quote_path1);
-      if(statvfs != 0 && !sshc->acceptfail) {
+      if(!statvfs && !sshc->acceptfail) {
         Curl_safefree(sshc->quote_path1);
         failf(data, "statvfs command failed: %s",
               ssh_get_error(sshc->ssh_session));
         state(conn, SSH_SFTP_CLOSE);
         sshc->nextstate = SSH_NO_STATE;
         sshc->actualcode = CURLE_QUOTE_ERROR;
-        if(statvfs)
-          sftp_statvfs_free(statvfs);
         break;
       }
       else {

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



reply via email to

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