Commit Graph

14173 Commits

Author SHA1 Message Date
Daniel Silverstone
a8ffa12cdf
options: Add disc_cache_path option
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-24 15:37:11 +00:00
Michael Drake
79821cd9cf Frontends: Delete maps resource links. 2020-02-24 15:02:12 +00:00
Michael Drake
0140d1e5b1 Curl fetcher: Guard against read of uninitialised value.
Fixes Coverity issue:

CID 1419830:  Memory - illegal accesses  (UNINIT)
>>>     Using uninitialized value "buf[depth]".
2020-02-24 14:58:16 +00:00
Michael Drake
63dd59bd2e Cache backing store: Add missing calloc check.
Found by coverity:

CID 1419831:  Null pointer dereferences  (NULL_RETURNS)
>>>     Dereferencing a pointer that might be "NULL" "url" when calling "read".
2020-02-24 14:34:37 +00:00
Michael Drake
b8dc537bf8 Curl fetcher: Squash coverity warning.
CID 1419832:  Control flow issues  (DEADCODE)
>>>     Execution cannot reach this statement: "goto out;".
2020-02-24 14:31:02 +00:00
Daniel Silverstone
bb5d72410b
fetchers: Rework the about, data, file, and resource fetcher poll loop
This simplifies the poll loops a little more and makes me less worried
that some other corner case will bite us in the future.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-24 14:25:37 +00:00
Michael Drake
a47270c93e About fetches resources: Drop maps resource.
It had bitrotted.
2020-02-24 14:21:27 +00:00
Daniel Silverstone
e59e52b853
windows: Convert the remaining NoMemory warnings which aren't about memory
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-24 12:10:35 +00:00
Daniel Silverstone
2fa06ed503
windows: Use nserror reporting rather than always NoMemory
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-24 11:57:18 +00:00
Daniel Silverstone
56a9a25192
Windows: Add nserror reporting function
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-24 11:57:02 +00:00
Daniel Silverstone
a970572fc9
Add BadURL message
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-24 11:55:34 +00:00
Daniel Silverstone
8ca778197c
framebuffer: Use new enumerate feature of libnsfb
1. Select as default the most useful compiled in surface
2. If the selected surface is unavailable, report the valid
   surface list to the user.  Also do this if the user specifies
   -f ? on the CLI.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-24 10:58:07 +00:00
Daniel Silverstone
b6d33785a0
hashmap: Fix a whitespace bogon
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-24 10:28:41 +00:00
Daniel Silverstone
97870122dd
fetch: When aborting, ensure we note this to not multi-fail
When aborting a fetch, it may be cleaned up, in which case we
would otherwise send a spurious failure message too early. Instead
we record that the abort has occurred to suppress such an error.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-24 10:24:23 +00:00
Daniel Silverstone
5cfe0dfffc
fetchers: Apply cleaner ring handling mechanic to other fetchers
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-24 09:51:44 +00:00
Daniel Silverstone
083ba385d7
fetch: Automatically handle fetches which fail to finish
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-24 09:47:52 +00:00
Daniel Silverstone
50ff8433da
browser_window: Use messages for unknown errors
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-24 09:47:23 +00:00
Daniel Silverstone
89e468422d
about: Correct handling of ring in fetch_about_poll
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-24 09:46:59 +00:00
Daniel Silverstone
5a028f61d3
test: Another corestring
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-24 09:20:14 +00:00
Michael Drake
21bbda23fa Browser window: Set the search string on show cookies.
We still need to tell the front end to open the cookies
window.
2020-02-24 08:55:26 +00:00
Michael Drake
214f436b07 Cookie manager: Add API to set the search string. 2020-02-24 08:49:50 +00:00
Michael Drake
34e61df8eb Treeview: Add API for setting the search string. 2020-02-24 08:44:52 +00:00
Michael Drake
a59646cbf8 Hashmap: Check for failure of first malloc. 2020-02-24 08:23:45 +00:00
Michael Drake
3cceb8ff2b Test: libmalloc_fig.so needs "-ldl". 2020-02-24 08:22:53 +00:00
Daniel Silverstone
360997c265
fs_backing_store: Clear entry memory flags on read
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-23 23:04:49 +00:00
Daniel Silverstone
f3a0e9f0a1
browser_window: Various little SSL fixes
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-23 22:32:58 +00:00
Daniel Silverstone
e6a5c090c9
curl: Implement SSL chain cache in cURL fetcher
Because cURL can do connection caching behind the scenes, we
need to have a cache for the SSL certificate chains which we
send onward on first header back from cURL.

This uses the new hashmap implementation to mean that we cache
chains on a hostname:port basis.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-23 22:31:58 +00:00
Daniel Silverstone
af53312b83
corestrings: add '443'
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-23 22:31:25 +00:00
Daniel Silverstone
5a5670410b
ssl_certs: Add dup_into
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-23 22:31:10 +00:00
Michael Drake
494db4cd51 Page info: Fix typo. 2020-02-23 21:04:38 +00:00
Daniel Silverstone
859972df71
llcache: Rework fs_backing_store to use hashmap
As a result, we no longer waste a bunch of RAM on the entries
tables.  This ought to be no slower, and more memory efficient.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-23 20:59:40 +00:00
Daniel Silverstone
ac75a9161e
llcache: Persist anything available during llcache_finalise
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-23 20:59:40 +00:00
Daniel Silverstone
088917641f
utils: Add hashmap_count()
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-23 20:59:40 +00:00
Daniel Silverstone
3e02961ec8
utils: Fix destroy of non-empty hashmap
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-23 20:59:40 +00:00
Daniel Silverstone
54b1960d18
utils: Add iteration API to hashmap
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-23 20:59:39 +00:00
Daniel Silverstone
fd80341513
utils: Add hashmap to sources
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-23 20:59:39 +00:00
Daniel Silverstone
61187d31ab
utils: Add hashmap parameter function types
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-23 20:59:39 +00:00
Michael Drake
be659af7e5 Page info: Avoid anonymous union for AmigaOS3 and OpenBSD. 2020-02-23 20:23:00 +00:00
Michael Drake
9062ae3c70 GTK: Page info: Change crtvrfy to pi throughout. 2020-02-23 17:38:14 +00:00
Michael Drake
66c069816a NetSurf: Init/fini the page-info module on browser startup/quit. 2020-02-23 17:38:14 +00:00
Michael Drake
0e4f09db0f Buildsystem: Build the page-info module. 2020-02-23 17:38:14 +00:00
Michael Drake
7a3f864940 Page info: Add core window size getter, and stub for keypresses. 2020-02-23 17:38:14 +00:00
Michael Drake
1149a1304d Page info: Implement mouse action handling. 2020-02-23 17:38:14 +00:00
Michael Drake
4b2697c989 Page info: Implement redraw. 2020-02-23 17:38:14 +00:00
Michael Drake
c32e1bb340 Page info: Implement page info window creation and destruction. 2020-02-23 17:38:14 +00:00
Michael Drake
3940918b68 Page info: Add data structures and module init/fini. 2020-02-23 17:38:14 +00:00
Michael Drake
9198c9958a Desktop: Add page-info API.
This will be a core window intended to show information about the
page currently shown in the associated browser window.
2020-02-23 17:38:14 +00:00
Michael Drake
8da6252f50 Browser window API: Add count for page state enum. 2020-02-23 17:38:14 +00:00
Michael Drake
a39b651620 Browser window: Add stubs for new interfaces for page-info dialogue. 2020-02-23 17:38:14 +00:00
Michael Drake
d23a7b4c8f Browser window: Constify bw through page_info_state getter. 2020-02-23 17:38:14 +00:00