[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 148/173: sftp: improved checks for create dir failu
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 148/173: sftp: improved checks for create dir failures |
Date: |
Fri, 24 Feb 2017 14:02:50 +0100 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to annotated tag gnurl-7.53.1
in repository gnurl.
commit af30f1152d43dcdb55978f0ee337775f43f2fd0b
Author: Jean Gressmann <address@hidden>
AuthorDate: Sun Feb 19 11:02:15 2017 +0100
sftp: improved checks for create dir failures
Since negative values are errors and not only -1. This makes SFTP upload
with --create-dirs work (again).
Closes #1269
---
lib/ssh.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/lib/ssh.c b/lib/ssh.c
index 5ed036a1e..086d40ecd 100644
--- a/lib/ssh.c
+++ b/lib/ssh.c
@@ -918,6 +918,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn,
bool *block)
&err_msg, NULL, 0);
infof(data, "SSH public key authentication failed: %s\n", err_msg);
state(conn, SSH_AUTH_PASS_INIT);
+ rc = 0; /* clear rc and continue */
}
break;
@@ -928,6 +929,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn,
bool *block)
}
else {
state(conn, SSH_AUTH_HOST_INIT);
+ rc = 0; /* clear rc and continue */
}
break;
@@ -989,6 +991,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn,
bool *block)
if(rc < 0) {
infof(data, "Failure connecting to agent\n");
state(conn, SSH_AUTH_KEY_INIT);
+ rc = 0; /* clear rc and continue */
}
else {
state(conn, SSH_AUTH_AGENT_LIST);
@@ -1008,6 +1011,7 @@ static CURLcode ssh_statemach_act(struct connectdata
*conn, bool *block)
if(rc < 0) {
infof(data, "Failure requesting identities to agent\n");
state(conn, SSH_AUTH_KEY_INIT);
+ rc = 0; /* clear rc and continue */
}
else {
state(conn, SSH_AUTH_AGENT);
@@ -1800,6 +1804,7 @@ static CURLcode ssh_statemach_act(struct connectdata
*conn, bool *block)
(data->set.ftp_create_missing_dirs &&
(strlen(sftp_scp->path) > 1))) {
/* try to create the path remotely */
+ rc = 0; /* clear rc and continue */
sshc->secondCreateDirs = 1;
state(conn, SSH_SFTP_CREATE_DIRS_INIT);
break;
@@ -1936,7 +1941,7 @@ static CURLcode ssh_statemach_act(struct connectdata
*conn, bool *block)
}
*sshc->slash_pos = '/';
++sshc->slash_pos;
- if(rc == -1) {
+ if(rc < 0) {
/*
* Abort if failure wasn't that the dir already exists or the
* permission was denied (creation might succeed further down the
@@ -1951,6 +1956,9 @@ static CURLcode ssh_statemach_act(struct connectdata
*conn, bool *block)
sshc->actualcode = result?result:CURLE_SSH;
break;
}
+ else {
+ rc = 0; /* clear rc and continue */
+ }
}
state(conn, SSH_SFTP_CREATE_DIRS);
break;
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 143/173: speed caps: update the timeouts if the speed is too low/high, (continued)
- [GNUnet-SVN] [gnurl] 143/173: speed caps: update the timeouts if the speed is too low/high, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 91/173: VC: remove the makefile.vc6 build infra, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 156/173: cyassl: fix typo, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 86/173: RELEASE-NOTES: synced with 01ab7c30bba6f, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 102/173: mbedtls: implement CTR-DRBG and HAVEGE random generators, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 161/173: docs: gitignore curl.1, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 122/173: http_proxy: avoid freeing static memory, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 145/173: string formatting: fix 4 printf-style format strings, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 163/173: bump: 7.53.1 coming up, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 117/173: THANKS-filter: polish some recent contributors, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 148/173: sftp: improved checks for create dir failures,
gnunet <=
- [GNUnet-SVN] [gnurl] 164/173: tests: Set CHARSET & LANG to UTF-8 in 1035, 2046 and 2047, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 155/173: release: 7.53.0, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 111/173: schannel: Remove incorrect SNI disabled message, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 147/173: digest_sspi: Fix nonce-count generation in HTTP digest, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 171/173: Revert "tests: use consistent environment variables for setting charset", gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 133/173: curl: fix typo in time condition warning message, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 127/173: URL: only accept "; options" in SMTP/POP3/IMAP URL schemes, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 126/173: cmdline-opts/socks*: Mention --preproxy in --socks* opts, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 168/173: rand: added missing #ifdef HAVE_FCNTL_H around fcntl.h header, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 136/173: tool_urlglob: Allow a glob range with the same start and stop, gnunet, 2017/02/24