]> granicus.if.org Git - curl/commitdiff
tool_operate: Moved list engines into separate function in tool_help
authorSteve Holme <steve_holme@hotmail.com>
Sat, 22 Feb 2014 16:04:30 +0000 (16:04 +0000)
committerSteve Holme <steve_holme@hotmail.com>
Sat, 22 Feb 2014 16:47:59 +0000 (16:47 +0000)
src/tool_help.c
src/tool_help.h
src/tool_operate.c

index fbd08e8af2ff3bce88ef46b1d89e38c8480b3553..7c74927eb792ca6525eac005d4dfecb5000038e4 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "tool_panykey.h"
 #include "tool_help.h"
+#include "tool_operhlp.h"
 
 #include "memdebug.h" /* keep this as LAST include */
 
@@ -256,3 +257,12 @@ void tool_help(void)
 #endif
   }
 }
+
+void tool_list_engines(CURL *curl)
+{
+  struct curl_slist *engines = NULL;
+
+  curl_easy_getinfo(curl, CURLINFO_SSL_ENGINES, &engines);
+  list_engines(engines);
+  curl_slist_free_all(engines);
+}
index 1b757dc80b5541a7ea8333a211f39e72b93031ea..775478df7e6fe6e62d6e27c7ed2abd1fe3912415 100644 (file)
@@ -24,6 +24,7 @@
 #include "tool_setup.h"
 
 void tool_help(void);
+void tool_list_engines(CURL *curl);
 
 #endif /* HEADER_CURL_TOOL_HELP_H */
 
index efe9bfc6477ef9a3f31cc665b4ae3d2d8f3ddd01..398cd812eecc8ae851117b4c9974682fd21accf4 100644 (file)
@@ -79,6 +79,7 @@
 #include "tool_writeout.h"
 #include "tool_xattr.h"
 #include "tool_vms.h"
+#include "tool_help.h"
 
 #include "memdebug.h" /* keep this as LAST include */
 
@@ -1831,10 +1832,7 @@ int operate(struct Configurable *config, int argc, argv_item_t argv[])
     }
     /* 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);
+      tool_list_engines(config->easy);
     }
     /* Perform the main operations */
     else {