From e37acd498fe663d7a20a76175358b60d460b2bc7 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Wed, 27 Jul 2005 22:49:53 +0000 Subject: [project @ 2005-07-27 22:49:53 by jmb] Mark invalid CSS contents with an error so they get flushed from the cache. svn path=/import/netsurf/; revision=1828 --- render/html.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/render/html.c b/render/html.c index 7e7062df9..935f72a46 100644 --- a/render/html.c +++ b/render/html.c @@ -672,6 +672,17 @@ void html_convert_css_callback(content_msg msg, struct content *css, content_set_status(c, messages_get("NotCSS")); content_broadcast(c, CONTENT_MSG_STATUS, data); content_remove_user(css, html_convert_css_callback, c, (void*)i); + if (!css->user_list) { + /* we were the only user and we + * don't want this content, so + * stop it fetching and mark it + * as having an error so it gets + * removed from the cache next time + * content_clean() gets called */ + fetch_abort(css->fetch); + css->fetch = 0; + css->status = CONTENT_STATUS_ERROR; + } } break; -- cgit v1.2.3