diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2006-02-06 00:10:09 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2006-02-06 00:10:09 +0000 |
commit | 0f228ada91a9460d1042b1a854fb1a0a32ed3f10 (patch) | |
tree | b8279b6c948d3c5d5b3cb470434b2dc6c85fbca4 /riscos | |
parent | c176e276e2de15a306872e3d4fa74193178eaadf (diff) | |
download | netsurf-0f228ada91a9460d1042b1a854fb1a0a32ed3f10.tar.gz netsurf-0f228ada91a9460d1042b1a854fb1a0a32ed3f10.tar.bz2 |
[project @ 2006-02-06 00:10:09 by jmb]
Implement HTTP caching algorithm; this should avoid stale cache entries being used.
svn path=/import/netsurf/; revision=2059
Diffstat (limited to 'riscos')
-rw-r--r-- | riscos/plugin.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/riscos/plugin.c b/riscos/plugin.c index 8a8b0c921..b1c26df2c 100644 --- a/riscos/plugin.c +++ b/riscos/plugin.c @@ -163,7 +163,7 @@ static bool plugin_active(struct content *c); static void plugin_stream_free(struct plugin_stream *p); static bool plugin_start_fetch(struct plugin_stream *p, const char *url); static void plugin_stream_callback(content_msg msg, struct content *c, - void *p1, void *p2, union content_msg_data data); + intptr_t p1, intptr_t p2, union content_msg_data data); static void plugin_fetch_callback(fetch_msg msg, void *p, const char *data, unsigned long size); @@ -1602,7 +1602,8 @@ void plugin_stream_free(struct plugin_stream *p) p->c->fetch = 0; p->c->status = CONTENT_STATUS_DONE; } - content_remove_user(p->c, plugin_stream_callback, p, 0); + content_remove_user(p->c, plugin_stream_callback, + (intptr_t)p, 0); } /* free normal stream context. file streams get freed later */ @@ -1649,7 +1650,7 @@ bool plugin_start_fetch(struct plugin_stream *p, const char *url) return false; } - c = fetchcache(url2, plugin_stream_callback, p, 0, + c = fetchcache(url2, plugin_stream_callback, (intptr_t)p, 0, 100, 100, true, 0, 0, true, true); free(url2); if (!c) { @@ -1657,7 +1658,7 @@ bool plugin_start_fetch(struct plugin_stream *p, const char *url) } p->c = c; - fetchcache_go(c, 0, plugin_stream_callback, p, 0, + fetchcache_go(c, 0, plugin_stream_callback, (intptr_t)p, 0, 100, 100, 0, 0, true); return true; @@ -1667,9 +1668,9 @@ bool plugin_start_fetch(struct plugin_stream *p, const char *url) * Callback for fetchcache() for plugin stream fetches. */ void plugin_stream_callback(content_msg msg, struct content *c, - void *p1, void *p2, union content_msg_data data) + intptr_t p1, intptr_t p2, union content_msg_data data) { - struct plugin_stream *p = p1; + struct plugin_stream *p = (struct plugin_stream *)p1; switch (msg) { case CONTENT_MSG_LOADING: @@ -1751,6 +1752,7 @@ void plugin_fetch_callback(fetch_msg msg, void *p, const char *data, case FETCH_TYPE: case FETCH_REDIRECT: + case FETCH_NOTMODIFIED: case FETCH_AUTH: default: /* not possible */ |