Author: dsilvers
Date: Wed Jun 27 17:27:52 2007
New Revision: 3373
URL:
http://svn.semichrome.net?rev=3D3373&view=3Drev
Log:
Add option_suppress_curl_debug and default it to true
Modified:
trunk/netsurf/content/fetchers/fetch_curl.c
trunk/netsurf/desktop/options.c
trunk/netsurf/desktop/options.h
Modified: trunk/netsurf/content/fetchers/fetch_curl.c
URL:
http://svn.semichrome.net/trunk/netsurf/content/fetchers/fetch_curl.c?=
rev=3D3373&r1=3D3372&r2=3D3373&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/netsurf/content/fetchers/fetch_curl.c (original)
+++ trunk/netsurf/content/fetchers/fetch_curl.c Wed Jun 27 17:27:52 2007
@@ -1288,6 +1288,12 @@
}
}
=
+/** Ignore everything given to it.
+ *
+ * Used to ignore cURL debug.
+ */
+int fetch_curl_ignore(void) { return 0; }
+
/**
* Initialise the fetcher.
*
@@ -1331,6 +1337,8 @@
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);
Modified: trunk/netsurf/desktop/options.c
URL:
http://svn.semichrome.net/trunk/netsurf/desktop/options.c?rev=3D3373&r=
1=3D3372&r2=3D3373&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/netsurf/desktop/options.c (original)
+++ trunk/netsurf/desktop/options.c Wed Jun 27 17:27:52 2007
@@ -128,6 +128,9 @@
* is this plus option_max_fetchers.
*/
int option_max_cached_fetch_handles =3D 6;
+/** Suppress debug output from cURL. */
+bool option_suppress_curl_debug =3D true;
+
/** Whether to allow target=3D"_blank" */
bool option_target_blank =3D true;
=
@@ -181,6 +184,7 @@
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
Modified: trunk/netsurf/desktop/options.h
URL:
http://svn.semichrome.net/trunk/netsurf/desktop/options.h?rev=3D3373&r=
1=3D3372&r2=3D3373&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/netsurf/desktop/options.h (original)
+++ trunk/netsurf/desktop/options.h Wed Jun 27 17:27:52 2007
@@ -73,6 +73,7 @@
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);