diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/tool_cfgable.h | 5 | ||||
-rw-r--r-- | src/tool_getparam.c | 8 | ||||
-rw-r--r-- | src/tool_operate.c | 10 |
3 files changed, 22 insertions, 1 deletions
diff --git a/src/tool_cfgable.h b/src/tool_cfgable.h index 9a9b6d8d3..144552e84 100644 --- a/src/tool_cfgable.h +++ b/src/tool_cfgable.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -205,6 +205,9 @@ struct Configurable { bool use_metalink; /* process given URLs as metalink XML file */ metalinkfile *metalinkfile_list; /* point to the first node */ metalinkfile *metalinkfile_last; /* point to the last/current node */ +#ifdef CURLDEBUG + bool test_event_based; +#endif }; /* struct Configurable */ void free_config_fields(struct Configurable *config); diff --git a/src/tool_getparam.c b/src/tool_getparam.c index c3d86931c..d9deb3b2b 100644 --- a/src/tool_getparam.c +++ b/src/tool_getparam.c @@ -174,6 +174,7 @@ static const struct LongShort aliases[]= { {"$I", "post303", FALSE}, {"$J", "metalink", FALSE}, {"$K", "sasl-ir", FALSE}, + {"$L", "test-event", FALSE}, {"0", "http1.0", FALSE}, {"1", "tlsv1", FALSE}, {"2", "sslv2", FALSE}, @@ -961,6 +962,13 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ case 'K': /* --sasl-ir */ config->sasl_ir = toggle; break; + case 'L': /* --test-event */ +#ifdef CURLDEBUG + config->test_event_based = toggle; +#else + warnf(config, "--test-event is ignored unless a debug build!\n"); +#endif + break; } break; case '#': /* --progress-bar */ diff --git a/src/tool_operate.c b/src/tool_operate.c index dbbbc26c2..60d09ff25 100644 --- a/src/tool_operate.c +++ b/src/tool_operate.c @@ -81,6 +81,11 @@ #include "memdebug.h" /* keep this as LAST include */ +#ifdef CURLDEBUG +/* libcurl's debug builds provide an extra function */ +CURLcode curl_easy_perform_ev(CURL *easy); +#endif + #define CURLseparator "--_curl_--" #ifndef O_BINARY @@ -1450,6 +1455,11 @@ int operate(struct Configurable *config, int argc, argv_item_t argv[]) mlfile->filename, this_url); #endif /* USE_METALINK */ +#ifdef CURLDEBUG + if(config->test_event_based) + res = curl_easy_perform_ev(curl); + else +#endif res = curl_easy_perform(curl); if(outs.is_cd_filename && outs.stream && !config->mute && |