In order to ease the moving of global options such as the error stream,
updated the OperationConfig structure to point to the GlobalConfig.
#include "tool_metalink.h"
+struct GlobalConfig;
+
struct OperationConfig {
CURL *easy; /* A copy of the handle from GlobalConfig */
bool remote_time;
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 */
};
/* 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;
/* 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;