/* When doing serial transfers, we use a single fixed error area */
static char global_errorbuffer[CURL_ERROR_SIZE];
+void single_transfer_cleanup(struct OperationConfig *config)
+{
+ if(config) {
+ struct State *state = &config->state;
+ if(state->urls) {
+ /* Free list of remaining URLs */
+ glob_cleanup(state->urls);
+ state->urls = NULL;
+ }
+ Curl_safefree(state->outfiles);
+ Curl_safefree(state->httpgetfields);
+ Curl_safefree(state->uploadfile);
+ if(state->inglob) {
+ /* Free list of globbed upload files */
+ glob_cleanup(state->inglob);
+ state->inglob = NULL;
+ }
+ }
+}
+
/*
* Call this after a transfer has completed.
*/
return result;
}
-static void single_transfer_cleanup(struct OperationConfig *config)
-{
- if(config) {
- struct State *state = &config->state;
- if(state->urls) {
- /* Free list of remaining URLs */
- glob_cleanup(state->urls);
- state->urls = NULL;
- }
- Curl_safefree(state->outfiles);
- Curl_safefree(state->httpgetfields);
- Curl_safefree(state->uploadfile);
- if(state->inglob) {
- /* Free list of globbed upload files */
- glob_cleanup(state->inglob);
- state->inglob = NULL;
- }
- }
-}
-
/*
* Return the protocol token for the scheme used in the given URL
*/
};
CURLcode operate(struct GlobalConfig *config, int argc, argv_item_t argv[]);
+void single_transfer_cleanup(struct OperationConfig *config);
extern struct per_transfer *transfers; /* first node */
*
***************************************************************************/
#include "tool_setup.h"
+#include "tool_operate.h"
#include "strcase.h"
}
config->url_list = NULL;
}
+ single_transfer_cleanup(config);
}
bool output_expected(const char *url, const char *uploadfile)
\
test440 test441 test442 test443 test444 \
\
-test490 test491 test492 test493 test494 test495 \
+test490 test491 test492 test493 test494 test495 test496 \
\
test500 test501 test502 test503 test504 test505 test506 test507 test508 \
test509 test510 test511 test512 test513 test514 test515 test516 test517 \