diff options
author | Steve Holme <steve_holme@hotmail.com> | 2014-02-14 21:59:51 +0000 |
---|---|---|
committer | Steve Holme <steve_holme@hotmail.com> | 2014-02-15 16:31:32 +0000 |
commit | f80ca7a05a2affce7b02f618592981aa02e61ce7 (patch) | |
tree | d1b2ec919870d044c51391826dfde3caa92ed7fe /src/tool_operate.c | |
parent | 89070d0e680402fd92468eb13073434ea5e5380e (diff) |
tool_operate: Moved required argument getting into separate function
Diffstat (limited to 'src/tool_operate.c')
-rw-r--r-- | src/tool_operate.c | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/src/tool_operate.c b/src/tool_operate.c index 0ecbcada9..fc54819ea 100644 --- a/src/tool_operate.c +++ b/src/tool_operate.c @@ -234,32 +234,18 @@ static int operate_do(struct Configurable *config) ** from outside of nested loops further down below. */ - if(config->userpwd && !config->xoauth2_bearer) { - res = checkpasswd("host", &config->userpwd); - if(res) - goto quit_curl; - } - - if(config->proxyuserpwd) { - res = checkpasswd("proxy", &config->proxyuserpwd); - if(res) - goto quit_curl; - } + /* Get the required aguments */ + res = get_args(config); + if(res) + goto quit_curl; + /* Check we have a url */ if(!config->url_list || !config->url_list->url) { helpf(config->errors, "no URL specified!\n"); res = CURLE_FAILED_INIT; goto quit_curl; } - if(!config->useragent) - config->useragent = my_useragent(); - if(!config->useragent) { - helpf(config->errors, "out of memory\n"); - res = CURLE_OUT_OF_MEMORY; - goto quit_curl; - } - /* On WIN32 we can't set the path to curl-ca-bundle.crt * at compile time. So we look here for the file in two ways: * 1: look at the environment variable CURL_CA_BUNDLE for a path |