]> granicus.if.org Git - curl/commitdiff
tool: generate easysrc only on --libcurl
authorDaniel Lee Hwang <danielleehwang@gmail.com>
Sun, 20 Sep 2015 06:16:23 +0000 (23:16 -0700)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 20 Sep 2015 10:54:18 +0000 (12:54 +0200)
Code should only be generated when --libcurl is used.

Bug: https://github.com/bagder/curl/issues/429
Reported-by: @greafhe, Jay Satiro
Closes #429
Closes #442

src/tool_operate.c

index 38d355da582f219782b6ffdda62740b0e51d9e7d..4e0f02807f2afdb5f0fc1e940f51b9483bb65dc9 100644 (file)
@@ -1369,9 +1369,10 @@ static CURLcode operate_do(struct GlobalConfig *global,
         retrystart = tvnow();
 
 #ifndef CURL_DISABLE_LIBCURL_OPTION
-        result = easysrc_perform();
-        if(result) {
-          goto show_error;
+        if(global->libcurl) {
+          result = easysrc_perform();
+          if(result)
+            goto show_error;
         }
 #endif
 
@@ -1863,7 +1864,8 @@ CURLcode operate(struct GlobalConfig *config, int argc, argv_item_t argv[])
     else {
 #ifndef CURL_DISABLE_LIBCURL_OPTION
       /* Initialise the libcurl source output */
-      result = easysrc_init();
+      if(config->libcurl)
+        result = easysrc_init();
 #endif
 
       /* Perform the main operations */