Skip to content
Snippets Groups Projects
Commit 17df2d8f authored by Steve Holme's avatar Steve Holme
Browse files

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.
parent fc59a9e1
No related branches found
No related tags found
No related merge requests found
......@@ -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 */
};
......
......@@ -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;
......
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment