1
0
mirror of https://github.com/moparisthebest/curl synced 2025-02-28 09:21:50 -05:00

tool_cfgable: Added GlobalConfig pointer to OperationConfig

In order to ease the moving of global options such as the error stream,
updated the OperationConfig structure to point to the GlobalConfig.
This commit is contained in:
Steve Holme 2014-02-26 21:02:53 +00:00
parent fc59a9e18f
commit 17df2d8f8e
3 changed files with 9 additions and 0 deletions

View File

@ -27,6 +27,8 @@
#include "tool_metalink.h"
struct GlobalConfig;
struct OperationConfig {
CURL *easy; /* A copy of the handle from GlobalConfig */
bool remote_time;
@ -213,6 +215,7 @@ struct OperationConfig {
bool nonpn; /* enable/disable TLS NPN extension */
bool noalpn; /* enable/disable TLS ALPN extension */
struct GlobalConfig *global;
struct OperationConfig* prev;
struct OperationConfig* next; /* Always last in the struct */
};

View File

@ -1838,6 +1838,9 @@ ParameterError parse_args(struct GlobalConfig *config, int argc,
/* Copy the easy handle */
operation->next->easy = config->easy;
/* Set the global config pointer */
operation->next->global = config;
/* Update the last operation pointer */
config->last = operation->next;

View File

@ -236,6 +236,9 @@ int parseconfig(const char *filename, struct GlobalConfig *global)
/* Copy the easy handle */
operation->next->easy = global->easy;
/* Set the global config pointer */
operation->next->global = global;
/* Update the last operation pointer */
global->last = operation->next;