summaryrefslogtreecommitdiff
path: root/src/tool_cb_wrt.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2019-07-20 19:14:00 +0200
committerDaniel Stenberg <daniel@haxx.se>2019-07-20 19:14:16 +0200
commitb88940850002a3f1c25bc6488b95ad30eb80d696 (patch)
tree9af44fc7571282e3adc379dbbff06d4d34c6c2b6 /src/tool_cb_wrt.c
parent14a385b3aec7f2f1c6a5247cf41c785990dfb39e (diff)
downloadcurl-b88940850002a3f1c25bc6488b95ad30eb80d696.tar.gz
curl: support parallel transfers
This is done by making sure each individual transfer is first added to a linked list as then they can be performed serially, or at will, in parallel. Closes #3804
Diffstat (limited to 'src/tool_cb_wrt.c')
-rw-r--r--src/tool_cb_wrt.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/tool_cb_wrt.c b/src/tool_cb_wrt.c
index 2f699f326..0f47b4d0f 100644
--- a/src/tool_cb_wrt.c
+++ b/src/tool_cb_wrt.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -28,6 +28,7 @@
#include "tool_cfgable.h"
#include "tool_msgs.h"
#include "tool_cb_wrt.h"
+#include "tool_operate.h"
#include "memdebug.h" /* keep this as LAST include */
@@ -75,7 +76,8 @@ bool tool_create_output_file(struct OutStruct *outs)
size_t tool_write_cb(char *buffer, size_t sz, size_t nmemb, void *userdata)
{
size_t rc;
- struct OutStruct *outs = userdata;
+ struct per_transfer *per = userdata;
+ struct OutStruct *outs = &per->outs;
struct OperationConfig *config = outs->config;
size_t bytes = sz * nmemb;
bool is_tty = config->global->isatty;
@@ -202,7 +204,7 @@ size_t tool_write_cb(char *buffer, size_t sz, size_t nmemb, void *userdata)
if(config->readbusy) {
config->readbusy = FALSE;
- curl_easy_pause(config->easy, CURLPAUSE_CONT);
+ curl_easy_pause(per->curl, CURLPAUSE_CONT);
}
if(config->nobuffer) {