Commit f1a9e685 authored by Steve Holme's avatar Steve Holme
Browse files

tool: Moved --libcurl to the global config

parent 75e996f2
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -135,8 +135,6 @@ static void free_config_fields(struct OperationConfig *config)

  Curl_safefree(config->ftp_account);
  Curl_safefree(config->ftp_alternative_to_user);

  Curl_safefree(config->libcurl);
}

void config_free(struct OperationConfig *config)
+1 −1
Original line number Diff line number Diff line
@@ -179,7 +179,6 @@ struct OperationConfig {
  bool ignorecl;            /* --ignore-content-length */
  bool disable_sessionid;

  char *libcurl;            /* output libcurl code to this file name */
  bool raw;
  bool post301;
  bool post302;
@@ -225,6 +224,7 @@ struct GlobalConfig {
  trace tracetype;
  bool tracetime;                 /* include timestamp? */
  int progressmode;               /* CURL_PROGRESS_BAR / CURL_PROGRESS_STATS */
  char *libcurl;                  /* Output libcurl code to this file name */

  struct OperationConfig *first;
  struct OperationConfig *current;
+2 −2
Original line number Diff line number Diff line
@@ -165,7 +165,7 @@ CURLcode easysrc_cleanup(void)
  return CURLE_OK;
}

void dumpeasysrc(struct OperationConfig *config)
void dumpeasysrc(struct GlobalConfig *config)
{
  struct curl_slist *ptr;
  char *o = config->libcurl;
@@ -180,7 +180,7 @@ void dumpeasysrc(struct OperationConfig *config)
    else
      out = stdout;
    if(!out)
      warnf(config, "Failed to open %s to write libcurl code!\n", o);
      warnf(config->current, "Failed to open %s to write libcurl code!\n", o);
    else {
      int i;
      const char *c;
+2 −1
Original line number Diff line number Diff line
@@ -40,7 +40,8 @@ extern CURLcode easysrc_add(struct curl_slist **plist, const char *bupf);
extern CURLcode easysrc_addf(struct curl_slist **plist, const char *fmt, ...);
extern CURLcode easysrc_perform(void);
extern CURLcode easysrc_cleanup(void);
void dumpeasysrc(struct OperationConfig *config);

void dumpeasysrc(struct GlobalConfig *config);

#endif /* CURL_DISABLE_LIBCURL_OPTION */

+1 −1
Original line number Diff line number Diff line
@@ -867,7 +867,7 @@ ParameterError getparameter(char *flag, /* f or -long-flag */
              "--libcurl option was disabled at build-time!\n");
        return PARAM_OPTION_UNKNOWN;
#else
        GetStr(&config->libcurl, nextarg);
        GetStr(&global->libcurl, nextarg);
        break;
#endif
      case '#': /* --raw */
Loading