diff options
author | Daniel Stenberg <daniel@haxx.se> | 2009-02-17 09:07:25 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2009-02-17 09:07:25 +0000 |
commit | 8f81fd6be5d3a480eca3f7ebbded5113f66c64be (patch) | |
tree | 278ce60a4c12407b3848b146208385c5aba63a6a /src | |
parent | 1472be4d3e55e1f3c0c0d1fdbee77a45630f326b (diff) |
- CURLOPT_FTP_CREATE_MISSING_DIRS can now be set to 2 in addition to 1 for
plain FTP connections, and it will then allow MKD to fail once and retry the
CWD afterwards. This is especially useful if you're doing many simultanoes
connections against the same server and they all have this option enabled,
as then CWD may first fail but then another connection does MKD before this
connection and thus MKD fails but trying CWD works! The numbers can
(should?) now be set with the convenience enums now called
CURLFTP_CREATE_DIR and CURLFTP_CREATE_DIR_RETRY.
Tests has proven that if you're making an application that uploads a set of
files to an ftp server, you will get a noticable gain in speed if you're
using multiple connections and this option will be then be very useful.
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/src/main.c b/src/main.c index 16abdfb7b..958c8b514 100644 --- a/src/main.c +++ b/src/main.c @@ -4753,11 +4753,11 @@ operate(struct Configurable *config, int argc, argv_item_t argv[]) /* new in curl 7.10 */ my_setopt(curl, CURLOPT_ENCODING, - (config->encoding) ? "" : NULL); + (config->encoding) ? "" : NULL); - /* new in curl 7.10.7 */ + /* new in curl 7.10.7, extended in 7.19.4 but this only sets 0 or 1 */ my_setopt(curl, CURLOPT_FTP_CREATE_MISSING_DIRS, - config->ftp_create_dirs); + config->ftp_create_dirs); if(config->proxyanyauth) my_setopt(curl, CURLOPT_PROXYAUTH, CURLAUTH_ANY); else if(config->proxynegotiate) @@ -4925,17 +4925,13 @@ operate(struct Configurable *config, int argc, argv_item_t argv[]) } if(retry) { - static const char * const m[]={NULL, - "timeout", - "HTTP error", - "FTP error" + static const char * const m[]={ + NULL, "timeout", "HTTP error", "FTP error" }; warnf(config, "Transient problem: %s " "Will retry in %ld seconds. " "%ld retries left.\n", - m[retry], - retry_sleep/1000, - retry_numretries); + m[retry], retry_sleep/1000, retry_numretries); go_sleep(retry_sleep); retry_numretries--; @@ -4977,15 +4973,13 @@ operate(struct Configurable *config, int argc, argv_item_t argv[]) } while(1); if((config->progressmode == CURL_PROGRESS_BAR) && - progressbar.calls) { + progressbar.calls) /* if the custom progress bar has been displayed, we output a newline here */ fputs("\n", progressbar.out); - } - if(config->writeout) { + if(config->writeout) ourWriteOut(curl, config->writeout); - } #ifdef USE_ENVIRONMENT if (config->writeenv) ourWriteEnv(curl); |