summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@netsurf-browser.org>2011-03-13 20:20:31 +0000
committerDaniel Silverstone <dsilvers@netsurf-browser.org>2011-03-13 20:20:31 +0000
commite083b503a0608f99b0651cc55bafd3a99f2121b4 (patch)
tree13d18f51ee076d3713b7ae6c071bef84d9aed668
parent8c1e6db760887f5fc8e0c325b6e698bc0da1de46 (diff)
downloadnetsurf-e083b503a0608f99b0651cc55bafd3a99f2121b4.tar.gz
netsurf-e083b503a0608f99b0651cc55bafd3a99f2121b4.tar.bz2
Ensure we stop the hlcache schedule before we quit the gui
svn path=/trunk/netsurf/; revision=12036
-rw-r--r--content/hlcache.c9
-rw-r--r--content/hlcache.h6
-rw-r--r--desktop/netsurf.c2
3 files changed, 14 insertions, 3 deletions
diff --git a/content/hlcache.c b/content/hlcache.c
index 08848e0aa..3b8d0b27a 100644
--- a/content/hlcache.c
+++ b/content/hlcache.c
@@ -104,6 +104,12 @@ hlcache_initialise(llcache_query_callback cb, void *pw)
return NSERROR_OK;
}
+/* See hlcache.h for documentation */
+void hlcache_stop(void)
+{
+ /* Remove the hlcache_clean schedule */
+ schedule_remove(hlcache_clean, NULL);
+}
/* See hlcache.h for documentation */
void hlcache_finalise(void)
@@ -112,9 +118,6 @@ void hlcache_finalise(void)
hlcache_entry *entry;
hlcache_retrieval_ctx *ctx, *next;
- /* Remove the hlcache_clean schedule */
- schedule_remove(hlcache_clean, NULL);
-
/* Obtain initial count of contents remaining */
for (num_contents = 0, entry = hlcache_content_list;
entry != NULL; entry = entry->next) {
diff --git a/content/hlcache.h b/content/hlcache.h
index 6738fea53..3006b9e4d 100644
--- a/content/hlcache.h
+++ b/content/hlcache.h
@@ -73,6 +73,12 @@ enum hlcache_retrieve_flag {
nserror hlcache_initialise(llcache_query_callback cb, void *pw);
/**
+ * Stop the high-level cache periodic functionality so that the
+ * exit sequence can run.
+ */
+void hlcache_stop(void);
+
+/**
* Finalise the high-level cache, destroying any remaining contents
*/
void hlcache_finalise(void);
diff --git a/desktop/netsurf.c b/desktop/netsurf.c
index 3edbae8d5..ed9dbb18b 100644
--- a/desktop/netsurf.c
+++ b/desktop/netsurf.c
@@ -175,6 +175,8 @@ int netsurf_main_loop(void)
void netsurf_exit(void)
{
+ hlcache_stop();
+
LOG(("Closing GUI"));
gui_quit();