Add option_suppress_curl_debug and default it to true

svn path=/trunk/netsurf/; revision=3373
This commit is contained in:
Daniel Silverstone 2007-06-27 16:27:52 +00:00
parent 82c4458689
commit e2d0019119
3 changed files with 13 additions and 0 deletions

View File

@ -1288,6 +1288,12 @@ fetch_curl_finalise(const char *scheme)
}
}
/** Ignore everything given to it.
*
* Used to ignore cURL debug.
*/
int fetch_curl_ignore(void) { return 0; }
/**
* Initialise the fetcher.
*
@ -1331,6 +1337,8 @@ void register_curl_fetchers(void)
SETOPT(CURLOPT_VERBOSE, 0);
}
SETOPT(CURLOPT_ERRORBUFFER, fetch_error_buffer);
if (option_suppress_curl_debug)
SETOPT(CURLOPT_DEBUGFUNCTION, fetch_curl_ignore);
SETOPT(CURLOPT_WRITEFUNCTION, fetch_curl_data);
SETOPT(CURLOPT_HEADERFUNCTION, fetch_curl_header);
SETOPT(CURLOPT_PROGRESSFUNCTION, fetch_curl_progress);

View File

@ -128,6 +128,9 @@ int option_max_fetchers_per_host = 2;
* is this plus option_max_fetchers.
*/
int option_max_cached_fetch_handles = 6;
/** Suppress debug output from cURL. */
bool option_suppress_curl_debug = true;
/** Whether to allow target="_blank" */
bool option_target_blank = true;
@ -181,6 +184,7 @@ struct {
OPTION_INTEGER, &option_max_fetchers_per_host },
{ "max_cached_fetch_handles",
OPTION_INTEGER, &option_max_cached_fetch_handles },
{ "suppress_curl_debug", OPTION_BOOL, &option_suppress_curl_debug },
{ "target_blank",
OPTION_BOOL, &option_target_blank },
EXTRA_OPTION_TABLE

View File

@ -73,6 +73,7 @@ extern int option_toolbar_status_width;
extern int option_max_fetchers;
extern int option_max_fetchers_per_host;
extern int option_max_cached_fetch_handles;
extern bool option_suppress_curl_debug;
void options_read(const char *path);