Commit Graph

157 Commits

Author SHA1 Message Date
Michael Drake
a4da4612c2 Logging: Bump lwc leak exit report to WARNING level. 2019-05-06 13:06:22 +01:00
Michael Drake
9c29935f3c HTTP Auth: Squash error path leaks. 2018-08-15 11:11:54 +01:00
Michael Drake
81a59f2f7c HTTP Auth: Do get/set auth in the core. 2018-08-14 18:52:11 +01:00
Michael Drake
19eb051727 HTTP authentication: Add some logging when opening 401 windows. 2018-08-09 17:18:39 +01:00
Vincent Sanders
2a03ea3049 move html and text content handlers where they belong 2018-05-10 13:37:02 +01:00
Vincent Sanders
75018632a9 Use coccinelle to change logging macro calls in c files
for F in $(git ls-files '*.c');do spatch --sp-file foo.cocci --in-place ${F};done

@@ expression E; @@
-LOG(E);
+NSLOG(netsurf, INFO, E);
@@ expression E, E1; @@
-LOG(E, E1);
+NSLOG(netsurf, INFO, E, E1);
@@ expression E, E1, E2; @@
-LOG(E, E1, E2);
+NSLOG(netsurf, INFO, E, E1, E2);
@@ expression E, E1, E2, E3; @@
-LOG(E, E1, E2, E3);
+NSLOG(netsurf, INFO, E, E1, E2, E3);
@@ expression E, E1, E2, E3, E4; @@
-LOG(E, E1, E2, E3, E4);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4);
@@ expression E, E1, E2, E3, E4, E5; @@
-LOG(E, E1, E2, E3, E4, E5);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5);
@@ expression E, E1, E2, E3, E4, E5, E6; @@
-LOG(E, E1, E2, E3, E4, E5, E6);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6);
@@ expression E, E1, E2, E3, E4, E5, E6, E7; @@
-LOG(E, E1, E2, E3, E4, E5, E6, E7);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6, E7);
2017-09-06 18:45:27 +01:00
Vincent Sanders
93e2b4855b make mimesniffing use core strings 2017-03-19 15:00:21 +00:00
Vincent Sanders
6075feb487 create netsurf inttypes header to have portable integer formatting macros 2017-01-21 14:20:55 +00:00
Chris Young
4ad375c3b0 Ensure memory used by Messages is freed on exit 2016-12-11 16:43:48 +00:00
Vincent Sanders
a2396edde4 complete transition to locale independant core operation
The netsurf core no longer uses any locale dependant operations
excepting the mall number or cases where such operations are
explicitly wanted.

the netsurf_init now calls setlocale with the empty string and lets
the c library setup as per its specific implementation.

any core functionality that specificaly processes ascii text must use
the utils/ascii.h header to do so.
2016-09-29 22:37:10 +01:00
Vincent Sanders
b939afe3fc Allow certificate verification user prompt creation to return errors 2016-07-31 13:25:20 +01:00
Vincent Sanders
8861923455 Allow include directories to be added by sub makefiles 2016-06-06 14:47:27 +01:00
Vincent Sanders
7fc0a4c481 move desktop window header into public API 2016-05-30 17:32:57 +01:00
Vincent Sanders
c041393e66 move netsurf header into public API 2016-05-30 11:51:10 +01:00
Vincent Sanders
fe7eb85614 move misc header into public API 2016-05-30 11:23:32 +01:00
Vincent Sanders
6722943b81 move the CSS content handler 2016-05-26 11:18:41 +01:00
Vincent Sanders
3224d7121a move image content handlers to accomodate core build changes 2016-05-23 23:32:16 +01:00
Vincent Sanders
33c7df0c40 complete the rename of the gui browser table
When the operations tables were created the browser table was renamed
to miscellaneous except the actual rename patch was never applied,
this fixes that situation.
2016-04-16 23:50:21 +01:00
Vincent Sanders
d15ab96a51 Fix size_t printf formatting
The printf formatting for size_t is set in c99 as %zu but in windows
it is %Iu this is solved by adding and inttypes style PRI macro for size_t

This also uses this macro everywhere size_t is formatted.
2016-03-17 22:00:54 +00:00
Daniel Silverstone
4d1ef3bac4 Add support for retrying timed-out cURL fetches.
This is an attempt to amelioriate the situation found in #2384 where
we see the cURL connect() failing to complete.  Based on the pcap
from the bug log, we believe that RISC OS is likely failing to signal
the completion of the connection to cURL.  As such, cURL times out.

This change permits retries of timed out connections in the hope that
a fresh socket FD might subsequently function correctly.  The defaults
chosen mean that the previous behaviour of 30 seconds before timeout
is reported will remain the same, but in that time we will make 3 separate
attempts to connect the socket.
2015-11-10 21:51:54 +00:00
Vincent Sanders
67ded2a02a This moves message loading out of netsurf_init into each frontend
The translated message loading is dependant on configuration of
resource location in each frontend, additionally they should have the
ability to deal with errors in this loading in a implementation
specific manner.

This also extends the message loading API to be capable of loading
from an inline memory buffer instead of from a file.
2015-06-21 23:27:22 +01:00
Vincent Sanders
335bbe4f52 Move the browser identification and machine info logging.
Previously this information was logged when netsurf_init was called
which might be many lines out output into the log.

It is useful to have this information at the beginning of the log to
make it easily found. In addition it makes netsurf_init less complex.
2015-06-21 23:27:21 +01:00
Vincent Sanders
c105738fa3 Change LOG() macro to be varadic
This changes the LOG macro to be varadic removing the need for all
callsites to have double bracketing and allows for future improvement
on how we use the logging macros.

The callsites were changed with coccinelle and the changes checked by
hand. Compile tested for several frontends but not all.

A formatting annotation has also been added which allows the compiler
to check the parameters and types passed to the logging.
2015-05-28 16:08:46 +01:00
Vincent Sanders
6b2676d33f Improve llcache writeout stratagy 2014-11-28 19:17:42 +00:00
Michael Drake
1ea422a9d1 Remove old URL header includes. 2014-10-31 14:41:53 +00:00
Vincent Sanders
02ff3920ce remove unused url_init function 2014-10-31 00:50:32 +00:00
Vincent Sanders
d06df231bc Update the core to use the split operations table headers
Second in the series to decouple the core API usage from the frontends.
2014-10-16 22:33:43 +01:00
Vincent Sanders
02bbaa3e88 split version info into its own header and remove unnecessary nesurf.h includes
The netsurf.h header should *only* contain the registration, core
initialisation and finalisation methods. Version information is best
placed in its own header.

Also remove any unneeded inclusion of this header limiting it to
solely the places the relevant API is required.
2014-10-13 15:08:16 +01:00
Vincent Sanders
bfc7552d8d remove netsurf_poll callback and netsurf main loop 2014-10-13 01:18:19 +01:00
Vincent Sanders
1b7aa7ffe5 make fetchers scheduled 2014-06-26 19:05:59 +01:00
Vincent Sanders
4b2101ba6a clean up the fetcher factory and improve its API 2014-06-19 18:27:24 +01:00
Vincent Sanders
8e29e517d5 fix disc cache size option to be unsigned 2014-06-09 13:13:59 +01:00
Vincent Sanders
a6d3ceae0e Completely re-write web search provider handling 2014-05-25 01:01:59 +01:00
Vincent Sanders
64f607760b add backing store storage path to browser initialisation 2014-05-13 15:53:06 +01:00
Vincent Sanders
4a49ff5266 Extend low level source data cache with persistant storage 2014-05-13 15:52:58 +01:00
Vincent Sanders
16b11e7238 ensure operations tables are registered as early as possible. 2014-05-10 10:22:10 +01:00
Vincent Sanders
d5a971c281 move verbose log global into logging module and remove netsurf.h include 2014-01-29 23:20:19 +00:00
Vincent Sanders
4987a3a8a7 remove forward refs from content/fetch.c and cleanup doc comments 2014-01-19 21:18:47 +00:00
Vincent Sanders
d47fed4524 move 401 login into operation table 2014-01-16 00:52:17 +00:00
Vincent Sanders
bd065d4a43 split browser gui operations up 2014-01-15 19:37:05 +00:00
Vincent Sanders
0075eab194 move remaining gui operations to table 2014-01-14 23:31:54 +00:00
Vincent Sanders
d3c392c3d3 Initial conversion of netsurf gui to callback vtable 2014-01-11 14:20:30 +00:00
Vincent Sanders
277bcec7c6 stop system colours being anything to do with frontends 2014-01-10 14:32:29 +00:00
Vincent Sanders
1502b08925 move option init out of netsurf_init 2013-05-28 14:16:11 +01:00
Vincent Sanders
ee6e6eec05 move options include 2013-05-28 14:16:10 +01:00
Vincent Sanders
35dacc3671 move the logging initialisation out to be call by frontends
This allows each frontend to pass a distinct callback to configure the
output file stream appropriately for their use.
2013-05-23 11:50:57 +01:00
Vincent Sanders
12ff7a47f4 removed unsuded memdebug utilities 2013-05-23 09:29:00 +01:00
Michael Drake
35eb251244 Fix "error setting certificate verify locations" problem when the Choices file doesn't exist. Now there's a single place for front ends to set options overrides. Fix nsoption_setnull_charp leak. 2012-10-17 14:20:18 +01:00
Michael Drake
d9e7d58106 Fix up ripples from urldb change. 2012-10-11 11:20:02 +01:00
Daniel Silverstone
2363301c94 Show refcnt in lwc iterator at netsurf exit. 2012-07-22 20:24:33 +01:00