[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 17/125: libssh: no need to call sftp_get_error as s
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 17/125: libssh: no need to call sftp_get_error as ssh_get_error is sufficient |
Date: |
Sun, 21 Jan 2018 23:41:12 +0100 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 8843c0939e99b3a89a505e7a2661a8bfd3a897ae
Author: Nikos Mavrogiannopoulos <address@hidden>
AuthorDate: Sun Dec 3 11:58:27 2017 +0100
libssh: no need to call sftp_get_error as ssh_get_error is sufficient
Fixes #2141
Signed-off-by: Nikos Mavrogiannopoulos <address@hidden>
---
lib/ssh-libssh.c | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/lib/ssh-libssh.c b/lib/ssh-libssh.c
index 8856d9044..d138959f3 100644
--- a/lib/ssh-libssh.c
+++ b/lib/ssh-libssh.c
@@ -896,7 +896,6 @@ static CURLcode myssh_statemach_act(struct connectdata
*conn, bool *block)
if(rc != 0 && !sshc->acceptfail) {
Curl_safefree(sshc->quote_path1);
Curl_safefree(sshc->quote_path2);
- err = sftp_get_error(sshc->sftp_session);
failf(data, "Attempt to set SFTP stats failed: %s",
ssh_get_error(sshc->ssh_session));
state(conn, SSH_SFTP_CLOSE);
@@ -916,7 +915,6 @@ static CURLcode myssh_statemach_act(struct connectdata
*conn, bool *block)
if(rc != 0 && !sshc->acceptfail) {
Curl_safefree(sshc->quote_path1);
Curl_safefree(sshc->quote_path2);
- err = sftp_get_error(sshc->sftp_session);
failf(data, "symlink command failed: %s",
ssh_get_error(sshc->ssh_session));
state(conn, SSH_SFTP_CLOSE);
@@ -932,7 +930,6 @@ static CURLcode myssh_statemach_act(struct connectdata
*conn, bool *block)
(mode_t)data->set.new_directory_perms);
if(rc != 0 && !sshc->acceptfail) {
Curl_safefree(sshc->quote_path1);
- err = sftp_get_error(sshc->sftp_session);
failf(data, "mkdir command failed: %s",
ssh_get_error(sshc->ssh_session));
state(conn, SSH_SFTP_CLOSE);
@@ -949,7 +946,6 @@ static CURLcode myssh_statemach_act(struct connectdata
*conn, bool *block)
if(rc != 0 && !sshc->acceptfail) {
Curl_safefree(sshc->quote_path1);
Curl_safefree(sshc->quote_path2);
- err = sftp_get_error(sshc->sftp_session);
failf(data, "rename command failed: %s",
ssh_get_error(sshc->ssh_session));
state(conn, SSH_SFTP_CLOSE);
@@ -964,7 +960,6 @@ static CURLcode myssh_statemach_act(struct connectdata
*conn, bool *block)
rc = sftp_rmdir(sshc->sftp_session, sshc->quote_path1);
if(rc != 0 && !sshc->acceptfail) {
Curl_safefree(sshc->quote_path1);
- err = sftp_get_error(sshc->sftp_session);
failf(data, "rmdir command failed: %s",
ssh_get_error(sshc->ssh_session));
state(conn, SSH_SFTP_CLOSE);
@@ -979,7 +974,6 @@ static CURLcode myssh_statemach_act(struct connectdata
*conn, bool *block)
rc = sftp_unlink(sshc->sftp_session, sshc->quote_path1);
if(rc != 0 && !sshc->acceptfail) {
Curl_safefree(sshc->quote_path1);
- err = sftp_get_error(sshc->sftp_session);
failf(data, "rm command failed: %s",
ssh_get_error(sshc->ssh_session));
state(conn, SSH_SFTP_CLOSE);
@@ -997,9 +991,8 @@ static CURLcode myssh_statemach_act(struct connectdata
*conn, bool *block)
statvfs = sftp_statvfs(sshc->sftp_session, sshc->quote_path1);
if(statvfs != 0 && !sshc->acceptfail) {
Curl_safefree(sshc->quote_path1);
- err = sftp_get_error(sshc->sftp_session);
- failf(data, "statvfs command failed: %s (%d)",
- ssh_get_error(sshc->ssh_session), err);
+ 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;
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 16/125: libssh: fix minor static code analyzer nits, (continued)
- [GNUnet-SVN] [gnurl] 16/125: libssh: fix minor static code analyzer nits, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 18/125: libssh: corrected use of sftp_statvfs() in SSH_SFTP_QUOTE_STATVFS, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 14/125: travis: use pip2 instead of pip, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 15/125: openssl: pkcs12 is supported by boringssl, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 19/125: RESOURCES: update spec names, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 21/125: ssh-libssh.c: please checksrc, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 22/125: libssh2: remove dead code from SSH_SFTP_QUOTE, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 08/125: libssh2: send the correct CURLE error code on scp file not found, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 03/125: SSL: Avoid magic allocation of SSL backend specific data, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 32/125: URL: tolerate backslash after drive letter for FILE:, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 17/125: libssh: no need to call sftp_get_error as ssh_get_error is sufficient,
gnunet <=
- [GNUnet-SVN] [gnurl] 28/125: conncache: only allow multiplexing within same multi handle, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 40/125: curl: limit -# update frequency for unknown total size, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 31/125: tests: added netinet/in6.h includes in test servers, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 41/125: configure: add AX_CODE_COVERAGE only if using gcc, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 36/125: openldap: fix checksrc nits, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 49/125: RESOLVE: output verbose text when trying to set a duplicate name, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 44/125: openssl: improve data-pending check for https proxy, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 29/125: curl-config: add --ssl-backends, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 23/125: sasl_getmesssage: make sure we have a long enough string to pass, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 24/125: libssh: remove dead code in sftp_qoute, gnunet, 2018/01/21