tool_operate: Moved list SSL engines code into operate()
This commit is contained in:
parent
dd97828df7
commit
456169f9e5
@ -247,7 +247,7 @@ static int operate_do(struct Configurable *config, int argc,
|
|||||||
goto quit_curl;
|
goto quit_curl;
|
||||||
}
|
}
|
||||||
|
|
||||||
if((!config->url_list || !config->url_list->url) && !config->list_engines) {
|
if(!config->url_list || !config->url_list->url) {
|
||||||
helpf(config->errors, "no URL specified!\n");
|
helpf(config->errors, "no URL specified!\n");
|
||||||
res = CURLE_FAILED_INIT;
|
res = CURLE_FAILED_INIT;
|
||||||
goto quit_curl;
|
goto quit_curl;
|
||||||
@ -353,15 +353,6 @@ static int operate_do(struct Configurable *config, int argc,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(config->list_engines) {
|
|
||||||
struct curl_slist *engines = NULL;
|
|
||||||
curl_easy_getinfo(curl, CURLINFO_SSL_ENGINES, &engines);
|
|
||||||
list_engines(engines);
|
|
||||||
curl_slist_free_all(engines);
|
|
||||||
res = CURLE_OK;
|
|
||||||
goto quit_curl;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Single header file for all URLs */
|
/* Single header file for all URLs */
|
||||||
if(config->headerfile) {
|
if(config->headerfile) {
|
||||||
/* open file for output: */
|
/* open file for output: */
|
||||||
@ -1853,6 +1844,13 @@ int operate(struct Configurable *config, int argc, argv_item_t argv[])
|
|||||||
else
|
else
|
||||||
result = CURLE_OK;
|
result = CURLE_OK;
|
||||||
}
|
}
|
||||||
|
/* Check if we were asked to list the SSL engines */
|
||||||
|
else if(config->list_engines) {
|
||||||
|
struct curl_slist *engines = NULL;
|
||||||
|
curl_easy_getinfo(config->easy, CURLINFO_SSL_ENGINES, &engines);
|
||||||
|
list_engines(engines);
|
||||||
|
curl_slist_free_all(engines);
|
||||||
|
}
|
||||||
/* Perform the main operation */
|
/* Perform the main operation */
|
||||||
else
|
else
|
||||||
result = operate_do(config, argc, argv);
|
result = operate_do(config, argc, argv);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user